package com.ss.android.article.base.app;

import android.app.Activity;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.location.LocationManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Message;
import android.support.v4.util.SparseArrayCompat;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.TextView;

import com.bytedance.article.common.c.TTUtils;
import com.bytedance.common.plugin.interfaces.pushmanager.client.SsRedbadgeManager;
import com.bytedance.common.utility.Logger;
import com.bytedance.common.utility.NetworkType;
import com.bytedance.common.utility.b.ThreadPlus;
import com.bytedance.common.utility.c.SharedPreferenceCompat;
import com.bytedance.common.utility.collection.WeakList;
import com.bytedance.common.utility.collection.e;
import com.bytedance.frameworks.b.a.ComponentsManifest;
import com.bytedance.frameworks.baselib.network.dispatcher.IRequest.Priority;
import com.bytedance.ttnet.a.AppConfig;
import com.ss.android.a.ABHelper;
import com.ss.android.a.AbManager;
import com.ss.android.account.Spipe;
import com.ss.android.account.activity.AuthActivity;
import com.ss.android.account.activity.AuthorizeActivity;
import com.ss.android.account.model.BaseUser;
import com.ss.android.action.b.ImpressionHelper;
import com.ss.android.action.b.ImpressionRecorder;
import com.ss.android.article.base.app.setting.AbSettings;
import com.ss.android.article.base.app.setting.AppSettings;
import com.ss.android.article.base.feature.a.CmdHandler;
import com.ss.android.article.base.feature.app.b.DBHelper;
import com.ss.android.article.base.feature.app.e.TTAndroidObject;
import com.ss.android.article.base.feature.app.schema.AdsAppActivity;
import com.ss.android.article.base.feature.category.a.CategoryManager;
import com.ss.android.article.base.feature.detail.model.ArticleDetail;
import com.ss.android.article.base.feature.detail2.DetailIntentCreator;
import com.ss.android.article.base.feature.feed.FeedTab;
import com.ss.android.article.base.feature.feed.presenter.AnswerQueryUtils;
import com.ss.android.article.base.feature.feed.presenter.ArticleQueryThread;
import com.ss.android.article.base.feature.feed.presenter.ListData;
import com.ss.android.article.base.feature.feed.presenter.RefreshAdManager;
import com.ss.android.article.base.feature.model.Article;
import com.ss.android.article.base.feature.model.ArticleTip;
import com.ss.android.article.base.feature.model.CellRef;
import com.ss.android.article.base.feature.subscribe.b.SubscribeManager;
import com.ss.android.article.base.feature.update.b.UpdateItemMgr;
import com.ss.android.article.base.feature.video.cache.VideoCacheController;
import com.ss.android.article.common.share.interf.IShareDataHook;
import com.ss.android.b.AdManager;
import com.ss.android.common.AbsApiThread;
import com.ss.android.common.AppContext;
import com.ss.android.common.app.AbsActivity;
import com.ss.android.common.applog.AppLog;
import com.ss.android.common.callback.CallbackCenter;
import com.ss.android.common.dialog.AlertDialog;
import com.ss.android.common.lib.MobClickCombiner;
import com.ss.android.common.location.LocationHelper;
import com.ss.android.common.location.LocationUploadHelper;
import com.ss.android.common.location.ServerLocationChangeHelper;
import com.ss.android.common.util.EventSender;
import com.ss.android.common.util.NetworkStatusMonitor;
import com.ss.android.common.util.NetworkUtils;
import com.ss.android.common.util.ToolUtils;
import com.ss.android.common.util.TtProperties;
import com.ss.android.common.util.json.JsonUtil;
import com.ss.android.d.SSDBHelper;
import com.ss.android.model.AbsArticle;
import com.ss.android.newmedia.BaseAppData;
import com.ss.android.newmedia.BaseApplication;
import com.ss.android.newmedia.MediaAppData;
import com.ss.android.newmedia.MediaAppDataProvider;
import com.ss.android.newmedia.a.AdsAppBaseActivity;
import com.ss.android.newmedia.a.DialogListener;
import com.ss.android.newmedia.a.WeakDialogListener;
import com.ss.android.newmedia.activity.AbsSplashActivity;
import com.ss.android.newmedia.e.AlertManager;
import com.ss.android.newmedia.e.InstalledAppTracker2;
import com.ss.android.newmedia.e.JsObject;
import com.ss.android.newmedia.feedback.FeedbackActivity;
import com.ss.android.newmedia.h.PluginInstaller;
import com.ss.android.newmedia.util.InfoLRUCache;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;

public class AppData extends BaseAppData implements
        com.ss.android.account.b.a.b.b$a,
        IShareDataHook,
        com.ss.android.common.applog.AppLog.g,
        ServerLocationChangeHelper.a {
    static final class a$a extends AsyncTask {
        private final AppData a;

        a$a(AppData arg1) {
            this.a = arg1;
        }

        private ArticleTip a(ArticleTip[] arg3) {
            ArticleTip v0 = null;
            ArticleTip v1 = arg3 == null || arg3.length <= 0 ? v0 : arg3[0];
            if (v1 != null) {
                try {
                    ArticleQueryThread.requestArticleTip(AppData.g(this.a), v1);
                } catch (Throwable v0_1) {
                }

                v0 = v1;
            }

            return v0;
        }

        protected final Object doInBackground(Object[] arg2) {
            return this.a(((ArticleTip[]) arg2));
        }

        protected final void onPostExecute(Object arg7) {
            AppData v1 = this.a;
            if (arg7 != null) {
                if (arg7 == v1.V.get(((ArticleTip) arg7).category)) {
                    v1.V.remove(((ArticleTip) arg7).category);
                }

                if (((ArticleTip) arg7).minBehotTime <= 0) {
                    a.h(this.a);
                    return;
                }

                Object v0 = v1.bv.get(((ArticleTip) arg7).category);
                if (v0 != null && ((b) v0).b == ((ArticleTip) arg7).minBehotTime) {
                    if (((ArticleTip) arg7).validCategory) {
                        ((b) v0).f = ((ArticleTip) arg7).tip;
                        ((b) v0).g = ((ArticleTip) arg7).count;
                        ((b) v0).c = System.currentTimeMillis();
                    } else {
                        ((b) v0).d = System.currentTimeMillis();
                    }

                    FeedTab v0_1 = v1.t();
                    if (v0_1 == null) {
                    } else {
                        v0_1.handleCategoryTip(((ArticleTip) arg7).category, ((ArticleTip) arg7).tip, ((ArticleTip) arg7).count);
                    }
                }

                if (!NetworkUtils.isNetworkAvailable(v1.mContext)) {
                } else {
                    v1.N();
                }
            }
            a.h(this.a);
        }
    }

    public static final class b {
        public long a;
        public long b;
        public long c;
        public long d;
        public long e;
        public String f;
        public String g;

        public b() {

        }
    }

    final class a$c extends BroadcastReceiver {
        private final AppData a;

        a$c(AppData arg1, byte arg2) {
            this(arg1);
        }

        private a$c(AppData arg1) {
            this.a = arg1;
        }

        public final void onReceive(Context context, Intent intent) {
            if (intent != null && ("android.intent.action.PACKAGE_ADDED".equals(intent.getAction()))) {
                try {
                    String pkg = intent.getDataString();
                    Logger.i("AppData", "package added: " + pkg);
                    if (!"com.storm.smart".equals(pkg.substring(8))) {
                        return;
                    }
                    AppData.i(this.a);
                } catch (Exception exception) {
                }
            }
        }
    }

    public interface a$d {
        void onPanelDislike(long arg1, boolean arg2);

        void onPanelRefresh(long arg1);
    }

    public int searchResultSource = 0;
    public String topSearchBarTipsStyle;
    int C = 0;
    public int buttonRefreshSetByUser = -1;
    public int preloadCountMax;
    public int preloadCountNormal;
    public int preloadCountMin;
    public long discoverPageRefreshSeconds = 10800;
    public long discoverPageLastRefreshTime = 0;
    public int detailReportType = -1;
    public String detailReportText = "";
    public int essayReportType = -1;
    public String essayReportText = "";
    public List N;
    public String essayReportOptions;
    public long mLastSyncEntryGroupListTime = 0;
    public int Q = 86400;
    public String discoverUrl = "";
    public int lazyLoadPolicy = 0;
    public WeakReference T;
    public int useTabTip = -1;
    LinkedHashMap V = new LinkedHashMap();
    public String W;
    public boolean X = true;
    public int key_allow_regist_device_manager = 0;
    public int essayCommentDetailEnabled = 0;
    public long a = 0;
    public boolean isLocaleRequestGps = false;
    public int lbsSyncInterval;
    public int lbsAlertInterval;
    public int lbsLocateInterval;
    public String currentCityName;
    public String jsActlogUrl;
    public int articleCommentMaxTextLength;
    public String articleCommentTooLongTips;
    public String aI = "";
    public long aJ;
    int videoOntab;
    public int showDislikeTip;
    public int isVivoMultiwindow;
    public boolean refreshAdDisable;
    public long refreshAdExpireSec;
    public int refreshButtonSettingEnabled;
    public int videoCellShowPlayCountEnabled = 1;
    public int videoPlayContinueFlag = 0;
    public int videoAutoPlayModeLocalSp = 1;
    public int quickLogin = 1;
    public int readWeixinName = 1;
    public int ssSyncAfterLogin = 1;
    public String registerPageTitle;
    public String loginPageTitle;
    public int detailSearchTabStyle;
    public long lastClickVideoTabTime = 0;
    public int mVideoIsShowToast = 0;
    public int mVideoPreloadingSize = 0;
    public String forumSettings;
    public String wendaSettings;
    public String webViewCommonQueryHostList = "[\"snssdk.com\",\"bytedance.com\"]";
    public boolean isWebViewCommonQueryEnable = true;
    public int enableWapReport;
    public float webTransformDelaySecFloat = 3f;
    public boolean mDisableWebTransform = false;
    public String mListUiOption = "";
    public String mDetailUiOption = "";
    public int al = 0;
    public int am = 0;
    public boolean favorFirstUnlogin = true;
    public boolean unloginFaverFirst = true;
    public boolean loginCommentFirst = true;
    public int pushDlgShowCount;
    public int pushDlgShowMax;
    public int pushDlgShowInterval;
    public long pushDlgShowLast = 0;
    public int perDlgShowInterval;
    public long perDlgShowLast = 0;
    public String pushInterestText;
    public boolean isSysLocaleUpload = true;
    public boolean isBaiduLocaleUpload = true;
    public boolean isGaodeLocaleUpload = true;
    public WeakList b = new WeakList();
    public NetworkStatusMonitor mNetworkStatusMonitor;
    public int videoTabBubbleInterval = 0;
    public int exitVideoDetailCount = 0;
    public String mLoginDialogStrategy;
    public int bd;
    public HashMap be = new HashMap();
    public boolean mPicSwipeBackGuide;
    public volatile String mMobileByTelecom;
    public boolean mUseTTEngine;
    public boolean mUseTTPlayer;
    public boolean mTTPlayerIp;
    public boolean mSearchRecommend;
    public boolean mSearchRecommendCount;
    public int mSearchRecommendTextCount;
    public long mUploadContactVersion;
    public HashMap bo = new HashMap();
    public boolean bp = false;
    public boolean bq = false;
    public int mLiteCategoryRefresh = 0;
    public int mShowLiteSubEntranceList = 0;
    public e bt = new e();
    public HashMap bu = new HashMap();
    public HashMap bv = new HashMap();
    public boolean isAppForeground = false;
    public final WeakList bx = new WeakList();
    public Article article;
    public volatile String bz;
    public boolean mBackRefresh = true;
    public int mLoadImagePref = 0;
    private int dB = 180;
    private int resizeWebView = 1;
    private int reAddWebView = 1;
    private int mPosterAdClickEnabled;
    private long mShowLoginTip = 0;
    private boolean mHasShowFlowSplash = false;
    private int updateBadgeInterval = 0;
    private String mArticleHostList = "";
    private String mAnswerHostList = "";
    private String mArticleContentHostList = "";
    private int mCategoryRefreshInterval = 0;
    private int mCategoryTipInterval = 0;
    private String openSrcWithBrowserList = "";
    private int allowDownloadBaofeng = 1;
    private int lastHintBaofengVersion = 0;
    private int sendEveryItemShow = 0;
    private int lastReadRefresh = 1;
    private int useOldParseJsonStyle = 0;
    private String writeCommentHint = null;
    private int settingFlags = 0;
    private int searchButtonSettingEnabled = 0;
    private int categoryTabWhiteStyleEnabled = 0;
    private int commentLoadMultiTab = 0;
    private int allowDxwidget = 0;
    private int maxImpressionCount = -1;
    public int mRefreshListPref = 0;
    private String testUserName = "";
    private boolean keyHasCareConcern = false;
    private boolean keyHasFollowForum = false;
    private int enableHuoshanSandbox = 0;
    private int mVideoPreloadingFlag = 0;
    private int mVideoUseTexture = 0;
    private int mVideoKeepPos = 1;
    private int keySellEntry = 0;
    private String lastTaobaoSdkDataFeed;
    private String lastTaobaoSdkExtlogFeed;
    private String lastTaobaoSdkDataDetail;
    private String lastTaobaoSdkExtlogDetail;
    private String sendPostInputPhone;
    private int architectureType = -1;
    private int abArchitectureType;
    private int testUserFlagV542 = 0;
    private int concernAbTestVersionCode = 0;
    private boolean eR = true;
    private int localConcernArchitectureType;
    private static String mTemiUrlList;
    private int trafficTrackIntervalSec = 60;
    private DialogListener eV;
    private int enableWapProfile;
    private String mFeedTextMaxLine;
    private JsConfigHelper mJsConfigHelper;
    private Map eZ = new LinkedHashMap();
    private boolean firstOffline = true;
    private long appActivityViewCursor = 0;
    private int allowAppActivity = 0;
    private int showListDigg = 1;
    private String mineSellIntroduce;
    private boolean ef = false;
    private boolean mKeyCloseShakeHand = true;
    private boolean useInfoStructure = true;
    private int mainInfoStructure = -1;
    private int lastInfoStructure = -1;
    private int ek = -1;
    private boolean needSendInfoStructure = false;
    private long em = 0;
    private static int useOkHttp = -1;
    private long eo = -1;
    private boolean ep = false;
    private int searchWapMode = 1;
    private int allowPermanentNotify = 0;
    private boolean permanentNotifyEnable = false;
    private int permanentNotifyWifiRefreshInterval = 600;
    private int permanentNotifyMobileRefreshInterval = 1800;
    private int permanentNotifyReplaceInterval = 6;
    private int permanentNotifyRefreshCount = 5;
    private boolean ex = false;
    private int sharedExtendedObjectEnabled = 0;
    private int useTestEnvironment = 0;
    public int mFontSizePref = 0;
    private long eventSenderHostRecordTime = 0;
    private int mEnableBaiduProfile = 1;
    private int pullToRefreshGuideSettingEnabled;
    private int categorySlideShownCount;
    private String getConfigWordsResultJson;
    private int categorySlideCount = 0;
    private boolean mCategorySlideCountAssinged = false;
    private int refreshFlashCount;
    private int currentRefreshFlashCount;
    private int videoAutoFullScreen;
    private int videoPlayerFlag = 0;
    private int videoPlayUseIpv6 = 0;
    private int videoAutoPlayFlag = 0;
    private int enableAccountV2 = 0;
    private String registerButtonText;
    private int isRecommendSelfAllowed;
    private int enableVideoTabBubble;
    private boolean keyHasTopicEntryRedDot;
    private int mVideoRedSpotFlag;
    private long mVideoRedSpotVersion;
    private int mVideoShortCutFlag;
    private boolean mVideoShortCutShowed = false;
    private long mVideoRedTipLastVersion = 0;
    private int mVideoAccelerometerRotation;
    private JSONObject mChannelControlConf;
    private HashMap fZ = new HashMap();
    private boolean contactDlgOk = false;
    private boolean contactUpdateFirst = true;
    private boolean contactUpdateFirstUnlogin = true;
    private int contactDlgShowCountAdd;
    private int contactDlgShowMaxAdd;
    private int contactDlgShowCountUpdate;
    private int contactDlgShowMaxUpdate;
    private int contactDlgShowCountFollow;
    private int contactDlgShowMaxFollow;
    private int contactDlgShowInterval;
    private long contactDlgShowLast = 0;
    private boolean loginDlgOk = false;
    private int loginDlgShowCountFavor;
    private int loginDlgShowMaxFavor;
    private int loginDlgShowCountComment;
    private int loginDlgShowMaxComent;
    private int loginDlgShowInterval;
    private long loginDlgShowLast = 0;
    private boolean pushDlgOk = false;
    private long pushInterestPullLast;
    private String pushGuideDlgArgs;
    private int fv;
    private String fw;
    private String slotIds;
    private int forumPostMinTextLength;
    private String eventSenderHost = "";
    public int mListCommentPref = 0;
    private AppSettings mAppSettings = (AppSettings) android.support.design.a.a(AppSettings.class);
    private AbSettings mAbSettings = (AbSettings) android.support.design.a.a(AbSettings.class);
    private boolean gc = true;
    private volatile boolean mFeedFirstLoad;
    private volatile boolean mFeedPullFirstLoad;
    private boolean hasFetchTTEngineEnable;
    private boolean hasFetchTTPlayerEnable;
    private boolean gh = false;
    private boolean isTTEngineEnable;
    private boolean isTTPlayerEnable;
    private boolean isTTPlayerTpEnable = false;
    private e gl = new e();
    private int gm = -1;
    private volatile boolean gn;
    private volatile int go;
    private volatile int gp;
    private BroadcastReceiver gq = null;
    private long gr = -1;
    public int clickShowLargeImageBtn = 0;
    public boolean mHasShowDislikeReadingDlg = false;
    public int mTryShowDislikeReadingDlgCount = 0;
    public int showIntroductionCount = 0;
    public int launchShowCount = 0;
    public int showLaunchLoginCount = 0;
    public String localCityName = "";
    public boolean mSwitchDomain = false;
    public int mArticleExpireSeconds = 0;
    public boolean mHackWebCoreHandler = false;
    public boolean mHackWebCoreHandlerZTE = false;
    public boolean mHackWebCoreHandlerAll = false;
    public boolean mDisableArticleInfoLayer = false;
    public int mCategoryTipDuration;
    public int mCategoryForceStreamInterval = 0;
    public int[] w = null;
    public int useImageQqShare = 1;
    int y = 0;
    public int z = 0;

    protected AppData(AppContext appContext, String arg10, String arg11) {
        super(appContext, arg10, arg11);
        new InfoLRUCache(5, 5);
        new PorterDuffColorFilter(this.mContext.getResources().getColor(com.ss.android.article.browser.R.color.nx), PorterDuff.Mode.SRC_ATOP);
        com.ss.android.c.a v0 = com.ss.android.c.a.b();
        CmdHandler cmdHandler = CmdHandler.inst(appContext.getContext());
        if (cmdHandler != null) {
            ArrayList v2 = v0.c;
            synchronized (v2) {
                if (!v0.c.contains(cmdHandler)) {
                    v0.c.add(cmdHandler);
                    v0.d = new ArrayList(v0.c);
                }
            }
        }

        this.mJsConfigHelper = new JsConfigHelper(this.mContext, this);
        if (!this.cK) {
            this.lastVersionCode = this.mContext.getSharedPreferences("app_setting", 0).getInt("last_version_code", 0);
            this.dh = true;
        }

        this.mNetworkStatusMonitor = new NetworkStatusMonitor(BaseApplication.getApplication());
    }

    public final boolean isPosterAdClickEnabled() {
        return this.mPosterAdClickEnabled != 0;
    }

    public final int B() {
        int v0 = 1;
        int v2 = this.ek;
        if (v2 == -1) {
            if (this.aD()) {
                if (!this.useInfoStructure) {
                    v0 = 0;
                }
            } else if (this.lastInfoStructure == 1) {
                v0 = 0;
            }

            this.ek = v0;
        } else {
            v0 = v2;
        }

        return v0;
    }

    public final int C() {
        int v0 = 0;
        if (this.B() == 1) {
            v0 = 1;
        }

        if (AppData.getInstance().B() == 1 && (AppData.getInstance().U())) {
            v0 |= 4;
        }

        if (this.B() == 1) {
            v0 |= this.abArchitectureType;
        }

        return v0;
    }

    public final boolean D() {
        return (this.C() & 2) > 0;
    }

    public final boolean showListDigg() {
        return this.showListDigg > 0;
    }

    public static int useOkHttp() {
        return AppData.useOkHttp;
    }

    public final void G() {
        this.cR.add("flow_mode");
        this.mLoadImagePref = 1;
        SharedPreferences.Editor editor = this.mContext.getSharedPreferences("app_setting", 0).edit();
        editor.putInt("load_image_pref", 1);
        SharedPreferenceCompat.commit(editor);
    }

    public final void H() {
    }

    public static long I() {
        return -1;
    }

    public final boolean meetSilenceTime() {
        boolean v0 = false;
        long silenceInterval = ((long) AppData.getInstance().getAbSettings().getSilenceInterval());
        if (silenceInterval > 0L
                && System.currentTimeMillis() - this.getAppSettingSp().getLong("lite_enter_background_time", 0L) > silenceInterval * 1000) {
            v0 = true;
        }
        return v0;
    }

    public final boolean K() {
        return super.K();
    }

    public final long L() {
        int v0 = 86400;
        int v1 = this.mCategoryRefreshInterval;
        if (v1 <= 0) {
            v0 = 43200;
        } else if (v1 <= v0) {
            v0 = v1;
        }

        return ((long) v0);
    }

    public final long M() {
        int v0 = 86400;
        int v1 = this.mCategoryTipInterval;
        if (v1 <= 0) {
            v0 = 900;
        } else if (v1 <= v0) {
            v0 = v1;
        }

        return ((long) v0);
    }

    final void N() {
        Object v1 = null;
        if (!this.ep) {
            Iterator v2 = this.V.keySet().iterator();
            Object v0;
            for (v0 = v1; v2.hasNext(); v0 = v2.next()) {
            }

            v0 = v0 != null ? this.V.get(v0) : v1;
            if (v0 == null) {
                return;
            }

            this.ep = true;
            com.bytedance.common.utility.b.a.a(new AppData.a$a(this), new ArticleTip[]{(ArticleTip) v0});
        }
    }

    public final void O() {
        String v4 = null;
        long v2 = 0;
        Iterator v1 = this.bv.values().iterator();
        while (v1.hasNext()) {
            Object v0 = v1.next();
            ((b) v0).a = v2;
            ((b) v0).b = v2;
            ((b) v0).c = v2;
            ((b) v0).d = v2;
            ((b) v0).e = v2;
            ((b) v0).f = v4;
            ((b) v0).g = v4;
        }
    }

    public final boolean sendEveryItemShow() {
        return this.sendEveryItemShow > 0;
    }

    public final boolean lastReadRefresh() {
        return this.lastReadRefresh > 0;
    }

    public final boolean useOldParseJsonStyle() {
        return this.useOldParseJsonStyle > 0;
    }

    public final String getWriteCommentHint() {
        return !android.support.design.a.isTextEmpty(this.writeCommentHint)
                ? this.writeCommentHint
                : this.mContext.getResources().getString(com.ss.android.article.browser.R.string.detail_write_comment);
    }

    public final void T() {
        this.y = this.settingFlags;
        this.C = this.categoryTabWhiteStyleEnabled;
        this.z = this.searchButtonSettingEnabled;
    }

    public final boolean U() {
        boolean v0 = true;
        if (this.z != 1) {
            v0 = false;
        }

        return v0;
    }

    public final boolean commentLoadMultiTab() {
        return this.commentLoadMultiTab > 0;
    }

    public final int useImageQqShare() {
        return this.useImageQqShare;
    }

    public static boolean X() {
        return false;
    }

    public static boolean Y() {
        return false;
    }

    public static boolean Z() {
        return false;
    }

    static int a(AppData arg1) {
        return arg1.go;
    }

    static long a(AppData arg1, long pushInterestPullLast) {
        arg1.pushInterestPullLast = pushInterestPullLast;
        return pushInterestPullLast;
    }

    static String a(AppData arg0, String arg1) {
        arg0.pushInterestText = arg1;
        return arg1;
    }

    public static void a(long arg8, long arg10, long arg12, int arg14) {
        com.ss.android.action.b.b v0_1;
        Object v0;
        long v4 = 0;
        if (arg8 > v4 && arg10 > v4) {
            String v1 = "subject_" + arg8;
            ImpressionHelper v2 = ImpressionHelper.getInstance();
            if (android.support.design.a.isTextEmpty(v1)) {
                v0_1 = null;
            } else {
                if (v2.a == null) {
                    v2.a = new HashMap();
                }

                String v3 = "1_" + v1;
                v0_1 = v2.a.get(v3);
                if (v0_1 != null) {

                } else if (!ImpressionHelper.a(1, v1)) {
                    v0_1 = v2.b();
                } else {
                    v0_1 = new ImpressionRecorder(v1, ((ImpressionRecorder.a) v2));
                    v2.a.put(v3, (ImpressionRecorder) v0_1);
                }
            }

            if (v0_1 == null) {
                return;
            }

            long v2_1 = arg12 > v4 ? arg12 : arg10;
            v0_1.a(String.valueOf(v2_1), String.valueOf(arg10), "item_id", arg12, "aggr_type", arg14);
        }
    }

    private static void a(Context context, int maxVersionCode, String abKey, int hitValue) {
        Logger.d("ab_test", "maxVersionCode:" + maxVersionCode + "; abKey:" + abKey + "; ratio:0.05; hitValue:" + hitValue);
        AppData v0 = AppData.getInstance();
        SharedPreferences v2 = context.getSharedPreferences("app_setting", 0);
        if (v2 != null && v0.cD < maxVersionCode) {
            int v0_1 = v2.getInt(abKey, -1);
            if (v0_1 > 0) {
                Logger.d("ab_test", "abKey:" + abKey + "; have set valid value:" + v0_1);
            } else {
                SharedPreferences.Editor editor = v2.edit();
                if (editor != null) {
                    boolean isHit = System.nanoTime() % 1000 < 50 ? true : false;
                    Logger.d("ab_test", "abKey:" + abKey + "; isHit:" + isHit);
                    editor.putInt(abKey, 0);
                    SharedPreferenceCompat.commit(editor);
                }
            }
        }
    }

    public final Intent a(Context arg11, int arg12, int arg13, JSONObject arg14, boolean arg15) {
        Intent v0;
        if (arg11 == null || arg14 == null) {
            v0 = null;
        } else {
            if (arg12 == 1 && arg13 == 2) {
                v0 = ToolUtils.getLaunchIntentForPackage(arg11, arg11.getPackageName());
                if (v0 != null) {
                    v0.putExtra("view_update", true);
                } else {
                }

                return v0;
            }

            long v2 = arg14.optLong("group_id");
            long v4 = arg14.optLong("item_id");
            int v6 = arg14.optInt("aggr_type");
            String v0_1 = arg14.optString("tag", "");
            if (v0_1 == null) {
                v0_1 = "";
            }

            if (v2 <= 0) {
                return null;
            }

            Intent intent = new Intent();
            intent.putExtra("view_single_id", true);
            intent.putExtra("group_id", v2);
            intent.putExtra("item_id", v4);
            intent.putExtra("aggr_type", v6);
            intent.putExtra("tag", v0_1);
            v0 = ComponentsManifest.findComponent(DetailIntentCreator.class).createNewDetailIntent(arg11, intent.getExtras());
            if (!arg15) {
                return v0;
            }

            this.c(new Article(v2, v4, v6));
        }

        return v0;
    }

    public final ListData a(int listType, String categoryName) {
        ListData v0_1;
        String v0 = AppData.b(listType, categoryName);
        if (v0 == null) {
            v0_1 = null;
        } else {
            Object v0_2 = this.bu.get(v0);
            v0_1 = v0_2 != null ? new ListData(((ListData) v0_2)) : new ListData();
            if (listType == 1) {
                return v0_1;
            }

            v0_1.c = false;
        }

        return v0_1;
    }

    public final String a(Context context, WebView webView) {
        String v0 = super.a(context, webView);
        if (!android.support.design.a.isTextEmpty(v0)) {
            StringBuilder stringBuilder = new StringBuilder(v0);
            NetworkType networkType = NetworkUtils.getNetworkType(this.mContext);
            stringBuilder.append(" NewsArticle/").append(this.getAppContext().getVersion());
            if (networkType != NetworkType.NONE) {
                stringBuilder.append(" NetType/").append(NetworkUtils.getNetworkAccessType(networkType));
            }
            return stringBuilder.toString();
        } else {
            return v0;
        }
    }

    public final String a(String arg13, boolean arg14, boolean arg15, boolean arg16) {
        ArticleTip v0_2;
        String v0;
        if (AppData.getInstance().getAbSettings().isFeedLoadMoreNewData()) {
            ABHelper.a(this.getAppContext());
            if (!ABHelper.b().equals("home_ui_lite_tab")) {
                ABHelper.a(this.getAppContext());
                if (ABHelper.b().equals("home_ui_main")) {
                    return "";
                }
            } else {
                return "";
            }
        }
        if (android.support.design.a.isTextEmpty(arg13)) {
            return null;
        }

        Object v0_1 = this.bv.get(arg13);
        String v4 = v0_1 != null ? ((b) v0_1).f : null;
        if (arg14) {
            String v1 = v0_1 != null ? ((b) v0_1).g : null;
            v4 = v1;
        }

        if (!arg15) {
            return v4;
        }

        if (v0_1 != null && ((b) v0_1).b > 0) {
            long v6 = System.currentTimeMillis();
            long v2 = ((b) v0_1).a;
            if (((b) v0_1).c > v2) {
                v2 = ((b) v0_1).c;
            }

            if (((b) v0_1).e > v2) {
                v2 = ((b) v0_1).e;
            }

            long v8 = this.M() * 1000;
            if (!arg16) {
                if (v6 - v2 <= v8) {
                    return v4;
                } else if (v6 - ((b) v0_1).d > 20000) {
                } else {
                    return v4;
                }
            }

            if (!NetworkUtils.isNetworkAvailable(this.mContext)) {
                return v4;
            }

            Object v1_1 = this.V.get(arg13);
            if (v1_1 != null) {
                this.V.remove(arg13);
                if (((ArticleTip) v1_1).minBehotTime != ((b) v0_1).b) {
                    v1_1 = null;
                }
            }

            if (v1_1 == null) {
                v0_2 = new ArticleTip(arg13, ((b) v0_1).b, this.localCityName);
            } else {
                v0_2 = (ArticleTip) v1_1;
            }

            this.V.put(arg13, v0_2);
            this.N();
        }

        label_80:
        v0 = v4;

        return v0;
    }

    public final List a(List arg11) {
        ArrayList v0_2;
        e v4 = this.gl;
        e v5 = this.bt;
        ArrayList v3 = new ArrayList();
        if (arg11 == null || (arg11.isEmpty())) {
            v0_2 = v3;
        } else {
            Iterator v6 = arg11.iterator();
            while (v6.hasNext()) {
                Object v0 = v6.next();
                int v1 = ((CellRef) v0).cellType == 0 || ((CellRef) v0).cellType == 3 ? 1 : 0;
                if (v1 == 0) {
                    ((List) v3).add(v0);
                    continue;
                }

                Object v1_1 = v4.a(((CellRef) v0).cellId);
                if (v1_1 != null && ((CellRef) v1_1).cellType != ((CellRef) v0).cellType) {
                    v1_1 = null;
                }

                if (((CellRef) v0).cellType != 0) {
                    continue;
                }

                String v2 = ((CellRef) v0).article.getItemKey();
                if (v1_1 == null) {
                    v1_1 = v5.a(v2);
                    if (v1_1 == null || v1_1 == ((CellRef) v0).article) {
                        v5.a(v2, ((CellRef) v0).article);
                    } else {
                        ((Article) v1_1).a(((CellRef) v0).article);
                        CellRef v2_1 = new CellRef(((CellRef) v0).category, ((CellRef) v0).cateBehotTime, ((Article) v1_1));
                        CellRef.copy(v2_1, ((CellRef) v0));
                        CellRef v0_1 = v2_1;
                    }

                    v4.a(((CellRef) v0).cellId, v0);
                    ((List) v3).add(v0);
                    continue;
                }

                CellRef.copy(((CellRef) v1_1), ((CellRef) v0));
                ((CellRef) v1_1).article.a(((CellRef) v0).article);
                ((List) v3).add(v1_1);
            }

            v0_2 = v3;
        }

        return ((List) v0_2);
    }

    public final void a(int arg3) {
        this.cR.add("font_size");
        this.mFontSizePref = arg3;
        this.cL = true;
    }

    public final void a(int arg9, int arg10, BaseUser arg11) {
        int v7 = 2;
        int v4 = 1009;
        if (arg11 != null && arg11.mUserId > 0) {
            SparseArrayCompat v0 = new SparseArrayCompat();
            if (arg9 != v4 || arg10 != 100) {
                if (arg9 == v4 && arg10 == 101) {
                    v0.put(v7, Integer.valueOf(0));
                } else if (arg9 == v4 && arg10 == 102) {
                    v0.put(1, Integer.valueOf(1));
                } else if (arg9 != v4) {
                } else if (arg10 != 103) {
                } else {
                    v0.put(1, Integer.valueOf(0));
                }
            } else {
                v0.put(v7, Integer.valueOf(1));
            }

            if (v0.size() == 0) {
                return;
            }

            CallbackCenter.TYPE v1 = BaseAppData.callbackTypeUserStateChanged;
            Object[] v2 = new Object[3];
            v2[0] = BaseAppData.callbackTypeUserStateChanged;
            v2[1] = Long.valueOf(arg11.mUserId);
            v2[v7] = v0;
            CallbackCenter.notifyCallback(v1, v2);
        }
    }

    public final void a(int arg5, String arg6, String arg7) {
        this.fw = "";
        if (!android.support.design.a.isTextEmpty(arg6)) {
            if (!android.support.design.a.isTextEmpty(arg6)) {
                this.currentCityName = arg6;
                SharedPreferences.Editor v0 = this.mContext.getSharedPreferences("app_setting", 0).edit();
                v0.putString("current_city_name", this.currentCityName);
                SharedPreferenceCompat.commit(v0);
            }

            this.fv = arg5;
            switch (arg5) {
                case 1: {
                    new ServerLocationChangeHelper(this.mContext).b(1, System.currentTimeMillis());
                    return;
                }
                case 2: {
                    this.fw = arg7;
                    Activity v0_1 = this.aO();
                    if (!(v0_1 instanceof FeedTab)) {
                        return;
                    }

                    if (!((FeedTab) v0_1).isActive()) {
                        return;
                    }

                    this.h(((FeedTab) v0_1).getActivity());
                    return;
                }
                case 3: {
                    Activity v0_1 = this.aO();
                    if (!(v0_1 instanceof FeedTab)) {
                        return;
                    }

                    if (!((FeedTab) v0_1).isActive()) {
                        return;
                    }

                    this.h(((FeedTab) v0_1).getActivity());
                    return;
                }
            }

            return;

        }
    }

    public final void a(long arg6) {
        this.loginDlgShowLast = arg6;
        this.perDlgShowLast = arg6;
        SharedPreferences.Editor v0 = this.mContext.getSharedPreferences("app_setting", 0).edit();
        v0.putLong("login_dlg_show_last", this.loginDlgShowLast);
        v0.putLong("per_dlg_show_last", this.perDlgShowLast);
        SharedPreferenceCompat.commit(v0);
    }

    public final void a(long arg8, String arg10, boolean arg11, boolean arg12) {
        int v1 = 0;
        if (arg8 > 0 && !android.support.design.a.isTextEmpty(arg10)) {
            DBHelper v0 = DBHelper.getInstance(this.mContext);
            if ((arg11) && v0 != null) {
                v0.a(25, arg8 + "-" + arg10, arg10);
            }

            Message v3 = this.mWeakHandler.obtainMessage(23);
            v3.obj = Long.valueOf(arg8);
            int v0_1 = arg11 ? 0 : 1;
            v3.arg1 = v0_1;
            if (!arg12) {
                v1 = 1;
            }

            v3.arg2 = v1;
            this.mWeakHandler.sendMessage(v3);
        }
    }

    public final void a(long arg6, boolean arg8, int arg9, int arg10) {
        int v2 = 1;
        Object v0 = this.bo.get(Long.valueOf(arg6));
        if (v0 == null) {
            com.ss.android.article.common.entity.a.a v0_1 = new com.ss.android.article.common.entity.a.a();
            v0_1.b = arg9;
            v0_1.a = arg8;
            v0_1.c = arg10;
            this.bo.put(Long.valueOf(arg6), v0_1);
        } else {
            int v1 = 0;
            if (!((com.ss.android.article.common.entity.a.a) v0).a && (arg8)) {
                ((com.ss.android.article.common.entity.a.a) v0).a = true;
                v1 = 1;
            }

            if (((com.ss.android.article.common.entity.a.a) v0).b < arg9) {
                ((com.ss.android.article.common.entity.a.a) v0).b = arg9;
                v1 = 1;
            }

            if (((com.ss.android.article.common.entity.a.a) v0).c < arg10) {
                ((com.ss.android.article.common.entity.a.a) v0).c = arg10;
            } else {
                v2 = v1;
            }

            if (v2 == 0) {
                return;
            }

            this.bo.put(Long.valueOf(arg6), v0);
        }
    }

    public final void a(Context arg4) {
        JsonUtil.setJsonInstanceFactory(com.ss.android.article.base.feature.app.aa.a());
        RequestValidator.a();
        super.a(arg4);
        this.T();
        com.ss.android.account.b.a.b.a(this.mContext).a(((com.ss.android.account.b.a.b.b$a) this));
        Spipe v0 = Spipe.inst();
        this.ef = v0.isLogin;
        this.eo = v0.isLogin ? v0.userId : -1;
        if (this.mJsConfigHelper != null) {
            this.mJsConfigHelper.a();
        }

        try {
            if (!android.support.design.a.isTextEmpty(this.getEventSenderHost())) {
                if (!Logger.debug() && !"local_test".equals(TtProperties.getInstance(this.mContext).readKey("meta_umeng_channel"))) {
                    EventSender.inst().setSenderEnable(false);
                } else {
                    this.aw();
                }
            } else {
                EventSender.inst().setSenderEnable(false);
            }

            PluginInstaller.reportInstallResult(arg4, "com.bytedance.common.plugin.lite");
            PluginInstaller.reportInstallResult(arg4, "com.bytedance.common.plugin.cronet");
        } catch (Exception v0_1) {
        }
    }

    public final void a(SharedPreferences.Editor editor) {
        super.a(editor);
        this.getAppSettings().saveData(editor);
        this.getAbSettings().saveData(editor);
        ABHelper v3 = ABHelper.a(this.getAppContext());
        int v2;
        for (v2 = 0; v2 < 4; ++v2) {
            Object v1 = v3.b[v2];
            if (((v1 instanceof String)) && !android.support.design.a.isTextEmpty((String) v1)) {
                editor.putString(v3.a[v2], ((String) v1));
            } else if ((v1 instanceof Long)) {
                editor.putLong(v3.a[v2], ((Long) v1).longValue());
            } else if ((v1 instanceof Integer)) {
                editor.putInt(v3.a[v2], ((Integer) v1).intValue());
            } else if ((v1 instanceof Boolean)) {
                editor.putBoolean(v3.a[v2], ((Boolean) v1).booleanValue());
            } else if ((v1 instanceof Float)) {
                editor.putFloat(v3.a[v2], ((Float) v1).floatValue());
            }
        }

        editor.putInt("load_image_pref", this.mLoadImagePref);
        editor.putInt("refresh_list_pref", this.mRefreshListPref);
        editor.putInt("font_size_pref", this.mFontSizePref);
        editor.putInt("list_comment_pref", this.mListCommentPref);
        editor.putBoolean("back_refresh", this.mBackRefresh);
        editor.putBoolean("has_show_flow_splash", this.mHasShowFlowSplash);
        editor.putBoolean("key_close_shake_hand", this.mKeyCloseShakeHand);
        editor.putBoolean("switch_domain", this.mSwitchDomain);
        editor.putInt("article_expire_seconds", this.mArticleExpireSeconds);
        editor.putBoolean("hack_webcore_handler", this.mHackWebCoreHandler);
        editor.putBoolean("hack_webcore_handler_zte", this.mHackWebCoreHandlerZTE);
        editor.putBoolean("hack_webcore_handler_all", this.mHackWebCoreHandlerAll);
        editor.putBoolean("disable_article_info_layer", this.mDisableArticleInfoLayer);
        editor.putString("article_host_list", this.mArticleHostList);
        editor.putString("answer_host_list", this.mAnswerHostList);
        editor.putString("article_content_host_list", this.mArticleContentHostList);
        editor.putInt("category_refresh_interval", this.mCategoryRefreshInterval);
        editor.putInt("category_tip_interval", this.mCategoryTipInterval);
        editor.putInt("category_tip_duration", this.mCategoryTipDuration);
        editor.putInt("category_force_stream_interval", this.mCategoryForceStreamInterval);
        editor.putString("open_src_with_browser_list", this.openSrcWithBrowserList);
        editor.putInt("allow_download_baofeng", this.allowDownloadBaofeng);
        editor.putInt("last_hint_baofeng_version", this.lastHintBaofengVersion);
        editor.putInt("use_image_qq_share", this.useImageQqShare);
        editor.putInt("allow_dxwidget", this.allowDxwidget);
        editor.putInt("send_every_item_show", this.sendEveryItemShow);
        editor.putInt("last_read_refresh", this.lastReadRefresh);
        editor.putInt("use_old_parse_json_style", this.useOldParseJsonStyle);
        editor.putString("write_comment_hint", this.writeCommentHint);
        editor.putInt("setting_flags", this.settingFlags);
        editor.putInt("search_button_setting_enabled", this.searchButtonSettingEnabled);
        editor.putString("top_search_bar_tips_style", this.topSearchBarTipsStyle);
        editor.putInt("search_result_source", this.searchResultSource);
        editor.putInt("category_tab_white_style_enabled", this.categoryTabWhiteStyleEnabled);
        editor.putInt("comment_load_multi_tab", this.commentLoadMultiTab);
        editor.putInt("button_refresh_set_by_user", this.buttonRefreshSetByUser);
        editor.putInt("max_impression_count", this.maxImpressionCount);
        editor.putInt("preload_count_max", this.preloadCountMax);
        editor.putInt("preload_count_normal", this.preloadCountNormal);
        editor.putInt("preload_count_min", this.preloadCountMin);
        editor.putBoolean("first_offline", this.firstOffline);
        editor.putLong("app_activity_view_cursor", this.appActivityViewCursor);
        editor.putInt("allow_app_activity", this.allowAppActivity);
        editor.putBoolean("use_info_structure", this.useInfoStructure);
        editor.putInt("main_info_structure", this.mainInfoStructure);
        editor.putInt("last_info_structure", this.lastInfoStructure);
        editor.putInt("use_tab_tip", this.useTabTip);
        editor.putInt("use_ok_http", AppData.useOkHttp);
        JsConfigHelper v0 = this.mJsConfigHelper;
        if (v0.c != null) {
            Iterator<Map.Entry> v1_1 = v0.c.entrySet().iterator();
            while (v1_1.hasNext()) {
                Object v0_1 = v1_1.next().getValue();
                if (v0_1 == null) {
                    continue;
                }

                ((JsConfigHelper.d) v0_1).intoSp(editor);
            }
        }

        editor.putInt("detail_report_type", this.detailReportType);
        editor.putString("detail_report_text", this.detailReportText);
        editor.putInt("essay_report_type", this.essayReportType);
        editor.putString("essay_report_text", this.essayReportText);
        editor.putString("essay_report_options", this.essayReportOptions);
        editor.putString("web_view_common_query_host_list", this.webViewCommonQueryHostList);
        editor.putInt("lazy_load_policy", this.lazyLoadPolicy);
        editor.putInt("update_badge_interval", this.updateBadgeInterval);
        editor.putInt("show_introduction_count", this.showIntroductionCount);
        editor.putInt("search_wap_mode", this.searchWapMode);
        editor.putInt("essay_comment_detail_enabled", this.essayCommentDetailEnabled);
        editor.putInt("allow_permanent_notify", this.allowPermanentNotify);
        editor.putInt("key_allow_regist_device_manager", this.key_allow_regist_device_manager);
        editor.putInt("use_test_environment", this.useTestEnvironment);
        editor.putInt("enable_huoshan_sandbox", this.enableHuoshanSandbox);
        editor.putString("test_user_name", this.testUserName);
        editor.putInt("shared_extended_object_enabled", this.sharedExtendedObjectEnabled);
        editor.putBoolean("permanent_notify_enable", this.permanentNotifyEnable);
        editor.putBoolean("is_web_view_common_query_enable", this.isWebViewCommonQueryEnable);
        editor.putInt("permanent_notify_mobile_refresh_interval", this.permanentNotifyMobileRefreshInterval);
        editor.putInt("permanent_notify_wifi_refresh_interval", this.permanentNotifyWifiRefreshInterval);
        editor.putInt("permanent_notify_replace_interval", this.permanentNotifyReplaceInterval);
        editor.putInt("permanent_notify_refresh_count", this.permanentNotifyRefreshCount);
        editor.putInt("show_list_digg", this.showListDigg);
        editor.putLong("discover_page_refresh_seconds", this.discoverPageRefreshSeconds);
        editor.putLong("discover_page_last_refresh_time", this.discoverPageLastRefreshTime);
        editor.putString("mine_sell_introduce", this.mineSellIntroduce);
        editor.putString("discover_url", this.discoverUrl);
        editor.putInt("key_sell_entry", this.keySellEntry);
        editor.putBoolean("contact_dlg_ok", this.contactDlgOk);
        editor.putInt("contact_dlg_show_count_add", this.contactDlgShowCountAdd);
        editor.putInt("contact_dlg_show_max_add", this.contactDlgShowMaxAdd);
        editor.putInt("contact_dlg_show_count_update", this.contactDlgShowCountUpdate);
        editor.putInt("contact_dlg_show_max_update", this.contactDlgShowMaxUpdate);
        editor.putInt("contact_dlg_show_count_follow", this.contactDlgShowCountFollow);
        editor.putInt("contact_dlg_show_max_follow", this.contactDlgShowMaxFollow);
        editor.putInt("contact_dlg_show_interval", this.contactDlgShowInterval);
        editor.putLong("contact_dlg_show_last", this.contactDlgShowLast);
        editor.putBoolean("contact_update_first", this.contactUpdateFirst);
        editor.putBoolean("contact_update_first_unlogin", this.contactUpdateFirstUnlogin);
        editor.putBoolean("favor_first_unlogin", this.favorFirstUnlogin);
        editor.putBoolean("login_dlg_ok", this.loginDlgOk);
        editor.putInt("login_dlg_show_count_favor", this.loginDlgShowCountFavor);
        editor.putInt("login_dlg_show_max_favor", this.loginDlgShowMaxFavor);
        editor.putInt("login_dlg_show_count_comment", this.loginDlgShowCountComment);
        editor.putInt("login_dlg_show_max_coment", this.loginDlgShowMaxComent);
        editor.putInt("login_dlg_show_interval", this.loginDlgShowInterval);
        editor.putLong("login_dlg_show_last", this.loginDlgShowLast);
        editor.putBoolean("unlogin_faver_first", this.unloginFaverFirst);
        editor.putBoolean("login_comment_first", this.loginCommentFirst);
        editor.putBoolean("push_dlg_ok", this.pushDlgOk);
        editor.putInt("push_dlg_show_count", this.pushDlgShowCount);
        editor.putInt("push_dlg_show_max", this.pushDlgShowMax);
        editor.putString("push_interest_text", this.pushInterestText);
        editor.putString("push_guide_dlg_args", this.pushGuideDlgArgs);
        editor.putLong("push_interest_pull_last", this.pushInterestPullLast);
        editor.putInt("push_dlg_show_interval", this.pushDlgShowInterval);
        editor.putLong("push_dlg_show_last", this.pushDlgShowLast);
        editor.putInt("per_dlg_show_interval", this.perDlgShowInterval);
        editor.putLong("per_dlg_show_last", this.perDlgShowLast);
        editor.putBoolean("is_sys_locale_upload", this.isSysLocaleUpload);
        editor.putBoolean("is_baidu_locale_upload", this.isBaiduLocaleUpload);
        editor.putBoolean("is_gaode_locale_upload", this.isGaodeLocaleUpload);
        editor.putBoolean("is_locale_request_gps", this.isLocaleRequestGps);
        editor.putInt("lbs_sync_interval", this.lbsSyncInterval);
        editor.putInt("lbs_alert_interval", this.lbsAlertInterval);
        editor.putInt("lbs_locate_interval", this.lbsLocateInterval);
        editor.putString("slot_ids", this.slotIds);
        editor.putString("js_actlog_url", this.jsActlogUrl);
        editor.putString("event_sender_host", this.eventSenderHost);
        editor.putLong("event_sender_host_record_time", this.eventSenderHostRecordTime);
        editor.putInt("forum_post_min_text_length", this.forumPostMinTextLength);
        editor.putInt("article_comment_max_text_length", this.articleCommentMaxTextLength);
        editor.putString("article_comment_too_long_tips", this.articleCommentTooLongTips);
        editor.putString("local_city_name", this.localCityName);
        editor.putString("current_city_name", this.currentCityName);
        editor.putBoolean("key_has_topic_entry_red_dot", this.keyHasTopicEntryRedDot);
        editor.putString("last_taobao_sdk_data_feed", this.lastTaobaoSdkDataFeed);
        editor.putString("last_taobao_sdk_extlog_feed", this.lastTaobaoSdkExtlogFeed);
        editor.putString("last_taobao_sdk_data_detail", this.lastTaobaoSdkDataDetail);
        editor.putString("last_taobao_sdk_extlog_detail", this.lastTaobaoSdkExtlogDetail);
        editor.putInt("traffic_track_interval_sec", this.trafficTrackIntervalSec);
        editor.putInt("video_ontab", this.videoOntab);
        editor.putInt("is_vivo_multiwindow", this.isVivoMultiwindow);
        editor.putInt("show_dislike_tip", this.showDislikeTip);
        editor.putInt("category_slide_count", this.categorySlideCount);
        editor.putInt("refresh_button_setting_enabled", this.refreshButtonSettingEnabled);
        editor.putInt("pull_to_refresh_guide_setting_enabled", this.pullToRefreshGuideSettingEnabled);
        editor.putInt("category_slide_shown_count", this.categorySlideShownCount);
        editor.putString("get_config_words_result_json", this.getConfigWordsResultJson);
        editor.putInt("refresh_flash_count", this.refreshFlashCount);
        editor.putInt("current_refresh_flash_count", this.currentRefreshFlashCount);
        editor.putInt("video_auto_full_screen", this.videoAutoFullScreen);
        editor.putInt("video_play_use_ipv6", this.videoPlayUseIpv6);
        editor.putInt("video_player_flag", this.videoPlayerFlag);
        editor.putInt("video_cell_show_play_count_enabled", this.videoCellShowPlayCountEnabled);
        editor.putInt("video_play_continue_flag", this.videoPlayContinueFlag);
        editor.putInt("video_auto_play_flag", this.videoAutoPlayFlag);
        editor.putInt("video_auto_play_mode_local_sp", this.videoAutoPlayModeLocalSp);
        editor.putInt("enable_video_tab_bubble", this.enableVideoTabBubble);
        editor.putLong("last_click_video_tab_time", this.lastClickVideoTabTime);
        editor.putInt("video_tab_bubble_interval", this.videoTabBubbleInterval);
        editor.putInt("exit_video_detail_count", this.exitVideoDetailCount);
        editor.putInt("enable_account_v2", this.enableAccountV2);
        editor.putInt("quick_login", this.quickLogin);
        editor.putInt("read_weixin_name", this.readWeixinName);
        editor.putInt("ss_sync_after_login", this.ssSyncAfterLogin);
        editor.putString("register_page_title", this.registerPageTitle);
        editor.putString("register_button_text", this.registerButtonText);
        editor.putString("login_page_title", this.loginPageTitle);
        editor.putInt("is_recommend_self_allowed", this.isRecommendSelfAllowed);
        editor.putInt("detail_search_tab_style", this.detailSearchTabStyle);
        editor.putInt("resize_web_view", this.resizeWebView);
        editor.putInt("re_add_web_view", this.reAddWebView);
        editor.putString("forum_settings", this.forumSettings);
        editor.putString("wenda_settings", this.wendaSettings);
        editor.putString("send_post_input_phone", this.sendPostInputPhone);
        editor.putInt("launch_show_count", this.launchShowCount);
        editor.putInt("show_launch_login_count", this.showLaunchLoginCount);
        editor.putInt("architecture_type", this.architectureType);
        editor.putInt("ab_architecture_type", this.abArchitectureType);
        editor.putInt("local_concern_architecture_type", this.localConcernArchitectureType);
        editor.putInt("test_user_flag_v542", this.testUserFlagV542);
        editor.putInt("concern_ab_test_version_code", this.concernAbTestVersionCode);
        editor.putBoolean("key_has_care_concern", this.keyHasCareConcern);
        editor.putBoolean("key_has_follow_forum", this.keyHasFollowForum);
        editor.putBoolean("refresh_ad_disable", this.refreshAdDisable);
        editor.putLong("refresh_ad_expire_sec", this.refreshAdExpireSec);
        editor.putInt("enable_wap_profile", this.enableWapProfile);
        editor.putInt("enable_wap_report", this.enableWapReport);
        editor.putFloat("web_transform_delay_sec_float", this.webTransformDelaySecFloat);
        editor.putBoolean("disable_web_transform", this.mDisableWebTransform);
        editor.putString("feed_text_max_line", this.mFeedTextMaxLine);
        editor.putInt("video_redspot_flag", this.mVideoRedSpotFlag);
        editor.putLong("video_redspot_version", this.mVideoRedSpotVersion);
        editor.putInt("video_shortcut_flag", this.mVideoShortCutFlag);
        editor.putBoolean("video_shortcut_showed", this.mVideoShortCutShowed);
        editor.putLong("video_red_tip_last_version", this.mVideoRedTipLastVersion);
        editor.putBoolean("concern_dialog_shown", this.mConcernDialogShown);
        editor.putInt("enable_baidu_profile", this.mEnableBaiduProfile);
        editor.putInt("video_preloading_flag", this.mVideoPreloadingFlag);
        editor.putInt("video_is_show_toast", this.mVideoIsShowToast);
        editor.putInt("video_use_texture", this.mVideoUseTexture);
        editor.putInt("video_preloading_size", this.mVideoPreloadingSize);
        editor.putInt("video_keep_pos", this.mVideoKeepPos);
        editor.putString("list_ui_option", this.mListUiOption);
        editor.putString("detail_ui_option", this.mDetailUiOption);
        editor.putString("temai_url_list", AppData.mTemiUrlList);
        editor.putString("login_dialog_strategy", this.mLoginDialogStrategy);
        editor.putInt("video_accelerometer_rotation", this.mVideoAccelerometerRotation);
        if (this.mChannelControlConf != null) {
            editor.putString("channel_control_conf", this.mChannelControlConf.toString());
        }

        editor.putInt("poster_ad_click_enabled", this.mPosterAdClickEnabled);
        editor.putInt("lite_category_refresh", this.mLiteCategoryRefresh);
        editor.putInt("show_lite_subentrance_list", this.mShowLiteSubEntranceList);
    }

    public final void a(SharedPreferences sp) {
        int v10 = -1;
        int v1 = 3;
        long v8 = 0;
        com.ss.android.l.c.c();
        super.a(sp);
        this.getAppSettings().loadData(sp);
        this.getAbSettings().loadData(sp);
        this.getAbSettings().afterLoadAppSetting();
        ABHelper v3 = ABHelper.a(this.getAppContext());
        int v0;
        for (v0 = 0; v0 < 4; ++v0) {
            v3.b[v0] = sp.getAll().get(v3.a[v0]);
        }

        this.mRefreshListPref = sp.getInt("refresh_list_pref", 0);
        this.mLoadImagePref = sp.getInt("load_image_pref", 0);
        if (this.mLoadImagePref < 0 || this.mLoadImagePref > 2) {
            this.mLoadImagePref = 0;
        }

        boolean v0_1 = this.mContext.getResources().getBoolean(com.ss.android.article.browser.R.bool.d);
        DisplayMetrics v5 = this.mContext.getResources().getDisplayMetrics();
        int v3_1 = v5.densityDpi >= 300 ? 1 : 0;
        if (v0_1) {
            v0 = 2;
            if (v3_1 != 0 && (TTUtils.a(this.mContext, v5.widthPixels, v5.heightPixels))) {
                v0 = v1;
            }
        } else {
            v0 = 0;
        }

        this.mFontSizePref = sp.getInt("font_size_pref", v0);
        if (this.mFontSizePref < 0 || this.mFontSizePref > v1) {
            this.mFontSizePref = 0;
        }

        this.mListCommentPref = sp.getInt("list_comment_pref", 0);
        if (this.mListCommentPref < 0 || this.mListCommentPref > 2) {
            this.mListCommentPref = 0;
        }

        if (sp.contains("back_refresh")) {
            this.mBackRefresh = sp.getBoolean("back_refresh", true);
        }

        this.ex = sp.contains("permanent_notify_enable");
        this.mKeyCloseShakeHand = sp.getBoolean("key_close_shake_hand", true);
        this.mSwitchDomain = sp.getBoolean("switch_domain", false);
        this.mShowLoginTip = sp.getLong("show_login_tip", v8);
        this.clickShowLargeImageBtn = sp.getInt("click_show_large_image_btn", 0);
        this.mArticleExpireSeconds = sp.getInt("article_expire_seconds", 600);
        this.mHackWebCoreHandler = sp.getBoolean("hack_webcore_handler", false);
        this.mHackWebCoreHandlerZTE = sp.getBoolean("hack_webcore_handler_zte", false);
        this.mHackWebCoreHandlerAll = sp.getBoolean("hack_webcore_handler_all", false);
        this.mDisableArticleInfoLayer = sp.getBoolean("disable_article_info_layer", false);
        this.mHasShowDislikeReadingDlg = sp.getBoolean("has_show_dislike_reading_dlg", false);
        this.mTryShowDislikeReadingDlgCount = sp.getInt("try_show_dislike_reading_dlg_count", 0);
        this.showIntroductionCount = sp.getInt("show_introduction_count", 0);
        this.mHasShowFlowSplash = sp.getBoolean("has_show_flow_splash", false);
        this.localCityName = sp.getString("local_city_name", "");
        this.currentCityName = sp.getString("current_city_name", "");
        this.mArticleHostList = sp.getString("article_host_list", "");
        this.mAnswerHostList = sp.getString("answer_host_list", "");
        this.mArticleContentHostList = sp.getString("article_content_host_list", "");
        ArticleQueryThread.a(l(this.mArticleHostList));
        ArticleQueryThread.b(l(this.mArticleContentHostList));
        AnswerQueryUtils.a(l(this.mAnswerHostList));
        AnswerQueryUtils.b(l(this.mArticleContentHostList));
        this.mCategoryRefreshInterval = sp.getInt("category_refresh_interval", 0);
        this.mCategoryTipInterval = sp.getInt("category_tip_interval", 0);
        this.mCategoryTipDuration = sp.getInt("category_tip_duration", 0);
        this.mCategoryForceStreamInterval = sp.getInt("category_force_stream_interval", 0);
        this.openSrcWithBrowserList = sp.getString("open_src_with_browser_list", "");
        this.w = android.support.design.a.w(this.openSrcWithBrowserList);
        this.allowDownloadBaofeng = sp.getInt("allow_download_baofeng", 0);
        this.lastHintBaofengVersion = sp.getInt("last_hint_baofeng_version", 0);
        this.useImageQqShare = sp.getInt("use_image_qq_share", 1);
        this.allowDxwidget = sp.getInt("allow_dxwidget", 0);
        this.sendEveryItemShow = sp.getInt("send_every_item_show", 0);
        this.lastReadRefresh = sp.getInt("last_read_refresh", 1);
        this.useOldParseJsonStyle = sp.getInt("use_old_parse_json_style", 0);
        this.writeCommentHint = sp.getString("write_comment_hint", null);
        this.settingFlags = sp.getInt("setting_flags", 0);
        this.searchButtonSettingEnabled = sp.getInt("search_button_setting_enabled", 0);
        this.topSearchBarTipsStyle = sp.getString("top_search_bar_tips_style", "");
        this.searchResultSource = sp.getInt("search_result_source", 0);
        this.categoryTabWhiteStyleEnabled = sp.getInt("category_tab_white_style_enabled", 0);
        this.buttonRefreshSetByUser = sp.getInt("button_refresh_set_by_user", v10);
        this.commentLoadMultiTab = sp.getInt("comment_load_multi_tab", 0);
        this.maxImpressionCount = sp.getInt("max_impression_count", v10);
        this.preloadCountMax = sp.getInt("preload_count_max", 10);
        this.preloadCountNormal = sp.getInt("preload_count_normal", 5);
        this.preloadCountMin = sp.getInt("preload_count_min", v1);
        this.firstOffline = sp.getBoolean("first_offline", true);
        this.appActivityViewCursor = sp.getLong("app_activity_view_cursor", v8);
        this.allowAppActivity = sp.getInt("allow_app_activity", 0);
        this.useInfoStructure = sp.getBoolean("use_info_structure", true);
        this.needSendInfoStructure = sp.getBoolean("need_send_info_structure", false);
        this.useTabTip = sp.getInt("use_tab_tip", v10);
        AppData.useOkHttp = sp.getInt("use_ok_http", v10);
        JsConfigHelper v0_2 = this.mJsConfigHelper;
        if (v0_2.c != null) {
            Iterator<Map.Entry> v3_2 = v0_2.c.entrySet().iterator();
            while (v3_2.hasNext()) {
                Object v0_3 = v3_2.next().getValue();
                if (v0_3 == null) {
                    continue;
                }

                ((JsConfigHelper.d) v0_3).loadFromSp(sp);
            }
        }

        this.detailReportType = sp.getInt("detail_report_type", v10);
        this.detailReportText = sp.getString("detail_report_text", "");
        this.essayReportType = sp.getInt("essay_report_type", v10);
        this.essayReportText = sp.getString("essay_report_text", "");
        this.essayReportOptions = sp.getString("essay_report_options", null);
        this.webViewCommonQueryHostList = sp.getString("web_view_common_query_host_list", "");
        this.lazyLoadPolicy = sp.getInt("lazy_load_policy", 0);
        this.updateBadgeInterval = sp.getInt("update_badge_interval", this.dB);
        this.showIntroductionCount = sp.getInt("show_introduction_count", 0);
        this.searchWapMode = sp.getInt("search_wap_mode", 1);
        this.essayCommentDetailEnabled = sp.getInt("essay_comment_detail_enabled", 0);
        this.allowPermanentNotify = sp.getInt("allow_permanent_notify", 0);
        this.key_allow_regist_device_manager = sp.getInt("key_allow_regist_device_manager", 0);
        this.useTestEnvironment = sp.getInt("use_test_environment", 0);
        this.enableHuoshanSandbox = sp.getInt("enable_huoshan_sandbox", 0);
        this.testUserName = sp.getString("test_user_name", "");
        this.sharedExtendedObjectEnabled = sp.getInt("shared_extended_object_enabled", 0);
        this.permanentNotifyEnable = sp.getBoolean("permanent_notify_enable", false);
        this.isWebViewCommonQueryEnable = sp.getBoolean("is_web_view_common_query_enable", false);
        this.permanentNotifyMobileRefreshInterval = sp.getInt("permanent_notify_mobile_refresh_interval", 1800);
        this.permanentNotifyWifiRefreshInterval = sp.getInt("permanent_notify_wifi_refresh_interval", 600);
        this.permanentNotifyReplaceInterval = sp.getInt("permanent_notify_replace_interval", 6);
        this.permanentNotifyRefreshCount = sp.getInt("permanent_notify_refresh_count", 5);
        this.keyHasCareConcern = sp.getBoolean("key_has_care_concern", false);
        this.keyHasFollowForum = sp.getBoolean("key_has_follow_forum", false);
        this.mAccessedContactConfirmed = sp.getInt("accessed_contact_confirmed", 1);
        this.showListDigg = sp.getInt("show_list_digg", 1);
        this.mLastSyncEntryGroupListTime = sp.getLong("last_sync_entry_group_list_time", v8);
        this.discoverPageRefreshSeconds = sp.getLong("discover_page_refresh_seconds", 10800);
        this.discoverPageLastRefreshTime = sp.getLong("discover_page_last_refresh_time", v8);
        this.mineSellIntroduce = sp.getString("mine_sell_introduce", this.mContext.getString(com.ss.android.article.browser.R.string.mine_item_sell_introduce));
        this.discoverUrl = sp.getString("discover_url", "");
        this.keySellEntry = sp.getInt("key_sell_entry", 0);
        this.contactDlgOk = sp.getBoolean("contact_dlg_ok", false);
        this.contactUpdateFirst = sp.getBoolean("contact_update_first", true);
        this.contactUpdateFirstUnlogin = sp.getBoolean("contact_update_first_unlogin", true);
        this.favorFirstUnlogin = sp.getBoolean("favor_first_unlogin", true);
        this.contactDlgShowCountAdd = sp.getInt("contact_dlg_show_count_add", 0);
        this.contactDlgShowMaxAdd = sp.getInt("contact_dlg_show_max_add", v1);
        this.contactDlgShowCountUpdate = sp.getInt("contact_dlg_show_count_update", 0);
        this.contactDlgShowMaxUpdate = sp.getInt("contact_dlg_show_max_update", v1);
        this.contactDlgShowCountFollow = sp.getInt("contact_dlg_show_count_follow", 0);
        this.contactDlgShowMaxFollow = sp.getInt("contact_dlg_show_max_follow", v1);
        this.contactDlgShowInterval = sp.getInt("contact_dlg_show_interval", 7);
        this.contactDlgShowLast = sp.getLong("contact_dlg_show_last", v8);
        this.loginDlgOk = sp.getBoolean("login_dlg_ok", false);
        this.loginDlgShowCountFavor = sp.getInt("login_dlg_show_count_favor", 0);
        this.loginDlgShowMaxFavor = sp.getInt("login_dlg_show_max_favor", v1);
        this.loginDlgShowCountComment = sp.getInt("login_dlg_show_count_comment", 0);
        this.loginDlgShowMaxComent = sp.getInt("login_dlg_show_max_coment", v1);
        this.loginDlgShowInterval = sp.getInt("login_dlg_show_interval", 7);
        this.loginDlgShowLast = sp.getLong("login_dlg_show_last", v8);
        this.unloginFaverFirst = sp.getBoolean("unlogin_faver_first", true);
        this.loginCommentFirst = sp.getBoolean("login_comment_first", true);
        this.pushDlgOk = sp.getBoolean("push_dlg_ok", false);
        this.pushDlgShowCount = sp.getInt("push_dlg_show_count", 0);
        this.pushDlgShowMax = sp.getInt("push_dlg_show_max", v1);
        this.pushDlgShowInterval = sp.getInt("push_dlg_show_interval", 7);
        this.pushDlgShowLast = sp.getLong("push_dlg_show_last", v8);
        this.pushInterestText = sp.getString("push_interest_text", "");
        this.pushGuideDlgArgs = sp.getString("push_guide_dlg_args", "");
        this.pushInterestPullLast = sp.getLong("push_interest_pull_last", v8);
        this.perDlgShowInterval = sp.getInt("per_dlg_show_interval", 1);
        this.perDlgShowLast = sp.getLong("per_dlg_show_last", v8);
        this.isSysLocaleUpload = sp.getBoolean("is_sys_locale_upload", true);
        this.isBaiduLocaleUpload = sp.getBoolean("is_baidu_locale_upload", true);
        this.isGaodeLocaleUpload = sp.getBoolean("is_gaode_locale_upload", true);
        this.isLocaleRequestGps = sp.getBoolean("is_locale_request_gps", false);
        this.lbsSyncInterval = sp.getInt("lbs_sync_interval", 600);
        this.lbsAlertInterval = sp.getInt("lbs_alert_interval", 7200);
        this.lbsLocateInterval = sp.getInt("lbs_locate_interval", 600);
        this.slotIds = sp.getString("slot_ids", "");
        this.jsActlogUrl = sp.getString("js_actlog_url", "");
        this.eventSenderHost = sp.getString("event_sender_host", "");
        this.eventSenderHostRecordTime = sp.getLong("event_sender_host_record_time", v8);
        this.keyHasTopicEntryRedDot = sp.getBoolean("key_has_topic_entry_red_dot", false);
        this.forumPostMinTextLength = sp.getInt("forum_post_min_text_length", 0);
        this.articleCommentMaxTextLength = sp.getInt("article_comment_max_text_length", 2000);
        this.articleCommentTooLongTips = sp.getString("article_comment_too_long_tips", "");
        this.lastTaobaoSdkDataFeed = sp.getString("last_taobao_sdk_data_feed", "");
        this.lastTaobaoSdkExtlogFeed = sp.getString("last_taobao_sdk_extlog_feed", "");
        this.lastTaobaoSdkDataDetail = sp.getString("last_taobao_sdk_data_detail", "");
        this.lastTaobaoSdkExtlogDetail = sp.getString("last_taobao_sdk_extlog_detail", "");
        this.trafficTrackIntervalSec = sp.getInt("traffic_track_interval_sec", 60);
        this.videoOntab = sp.getInt("video_ontab", 1);
        this.showDislikeTip = sp.getInt("show_dislike_tip", 0);
        this.isVivoMultiwindow = sp.getInt("is_vivo_multiwindow", v10);
        this.categorySlideCount = sp.getInt("category_slide_count", 0);
        this.mCategorySlideCountAssinged = sp.getBoolean("category_slide_count_assinged", false);
        this.refreshButtonSettingEnabled = sp.getInt("refresh_button_setting_enabled", 2);
        this.pullToRefreshGuideSettingEnabled = sp.getInt("pull_to_refresh_guide_setting_enabled", 0);
        sp.getBoolean("is_send_btn_showing", false);
        this.categorySlideShownCount = sp.getInt("category_slide_shown_count", 0);
        this.getConfigWordsResultJson = sp.getString("get_config_words_result_json", "");
        sp.getString("report_config_words_req_json", "");
        sp.getInt("first_version_code", 0);
        this.refreshFlashCount = sp.getInt("refresh_flash_count", 5);
        this.currentRefreshFlashCount = sp.getInt("current_refresh_flash_count", 0);
        this.videoAutoFullScreen = sp.getInt("video_auto_full_screen", 0);
        this.videoPlayUseIpv6 = sp.getInt("video_play_use_ipv6", 0);
        this.videoPlayerFlag = sp.getInt("video_player_flag", 0);
        this.videoCellShowPlayCountEnabled = sp.getInt("video_cell_show_play_count_enabled", 1);
        this.videoPlayContinueFlag = sp.getInt("video_play_continue_flag", 0);
        this.videoAutoPlayFlag = sp.getInt("video_auto_play_flag", 0);
        this.videoAutoPlayModeLocalSp = sp.getInt("video_auto_play_mode_local_sp", 1);
        this.enableVideoTabBubble = sp.getInt("enable_video_tab_bubble", 1);
        this.lastClickVideoTabTime = sp.getLong("last_click_video_tab_time", v8);
        this.videoTabBubbleInterval = sp.getInt("video_tab_bubble_interval", 7);
        this.exitVideoDetailCount = sp.getInt("exit_video_detail_count", 0);
        this.enableAccountV2 = sp.getInt("enable_account_v2", 0);
        this.quickLogin = sp.getInt("quick_login", 1);
        this.readWeixinName = sp.getInt("read_weixin_name", 1);
        this.ssSyncAfterLogin = sp.getInt("ss_sync_after_login", 1);
        this.registerPageTitle = sp.getString("register_page_title", "");
        this.registerButtonText = sp.getString("register_button_text", "");
        this.loginPageTitle = sp.getString("login_page_title", "");
        this.isRecommendSelfAllowed = sp.getInt("is_recommend_self_allowed", 0);
        this.detailSearchTabStyle = sp.getInt("detail_search_tab_style", 0);
        this.resizeWebView = sp.getInt("resize_web_view", 1);
        this.reAddWebView = sp.getInt("re_add_web_view", 1);
        this.forumSettings = sp.getString("forum_settings", "");
        this.wendaSettings = sp.getString("wenda_settings", "");
        this.architectureType = sp.getInt("architecture_type", v10);
        this.abArchitectureType = sp.getInt("ab_architecture_type", 0);
        this.localConcernArchitectureType = sp.getInt("local_concern_architecture_type", 0);
        long v0_4 = System.currentTimeMillis();
        if (this.mLastSyncEntryGroupListTime > v0_4) {
            this.mLastSyncEntryGroupListTime = v0_4;
        }

        this.sendPostInputPhone = sp.getString("send_post_input_phone", "");
        this.launchShowCount = sp.getInt("launch_show_count", 0);
        this.showLaunchLoginCount = sp.getInt("show_launch_login_count", 0);
        this.testUserFlagV542 = sp.getInt("test_user_flag_v542", 0);
        this.concernAbTestVersionCode = sp.getInt("concern_ab_test_version_code", 0);
        this.refreshAdDisable = sp.getBoolean("refresh_ad_disable", false);
        this.refreshAdExpireSec = sp.getLong("refresh_ad_expire_sec", v8);
        this.enableWapProfile = sp.getInt("enable_wap_profile", 0);
        this.enableWapReport = sp.getInt("enable_wap_report", 0);
        this.webTransformDelaySecFloat = sp.getFloat("web_transform_delay_sec_float", 3f);
        this.mDisableWebTransform = sp.getBoolean("disable_web_transform", false);
        this.mFeedTextMaxLine = sp.getString("feed_text_max_line", "");
        n(this.mFeedTextMaxLine);
        sp.getBoolean("guide_refresh_timeout", false);
        this.mVideoRedSpotFlag = sp.getInt("video_redspot_flag", 0);
        this.mVideoRedSpotVersion = sp.getLong("video_redspot_version", v8);
        this.mVideoShortCutFlag = sp.getInt("video_shortcut_flag", 0);
        this.mVideoShortCutShowed = sp.getBoolean("video_shortcut_showed", false);
        this.mVideoRedTipLastVersion = sp.getLong("video_red_tip_last_version", v8);
        this.mConcernDialogShown = sp.getBoolean("concern_dialog_shown", true);
        this.mEnableBaiduProfile = sp.getInt("enable_baidu_profile", 1);
        this.mVideoPreloadingFlag = sp.getInt("video_preloading_flag", 0);
        this.mVideoIsShowToast = sp.getInt("video_is_show_toast", 0);
        this.mVideoUseTexture = sp.getInt("video_use_texture", 0);
        this.mVideoPreloadingSize = sp.getInt("video_preloading_size", 0);
        this.mVideoKeepPos = sp.getInt("video_keep_pos", 1);
        this.mListUiOption = sp.getString("list_ui_option", "");
        this.mDetailUiOption = sp.getString("detail_ui_option", "");
        mTemiUrlList = sp.getString("temai_url_list", "");
        this.mLoginDialogStrategy = sp.getString("login_dialog_strategy", "");
        this.mVideoAccelerometerRotation = sp.getInt("video_accelerometer_rotation", 0);
        this.mPicSwipeBackGuide = sp.getBoolean("pic_swipe_back_guide", false);
        this.mMobileByTelecom = sp.getString("mobile_by_telecom", null);
        this.mUseTTEngine = sp.getBoolean("use_ttengine", false);
        this.mUseTTPlayer = sp.getBoolean("use_ttplayer", false);
        this.mTTPlayerIp = sp.getBoolean("ttplayer_ip", false);
        this.mSearchRecommend = sp.getBoolean("search_recommend", false);
        this.mSearchRecommendCount = sp.getBoolean("search_recommend_count", false);
        this.mSearchRecommendTextCount = sp.getInt("search_recommend_text_count", 1);
        this.mUploadContactVersion = sp.getLong("upload_contact_version", v8);
        this.mFeedFirstLoad = sp.getBoolean("feed_first_load", true);
        this.mFeedPullFirstLoad = sp.getBoolean("feed_pull_first_load", true);
        this.mLiteCategoryRefresh = sp.getInt("lite_category_refresh", 0);
        String channelControlConf = sp.getString("channel_control_conf", "");
        this.mShowLiteSubEntranceList = sp.getInt("show_lite_subentrance_list", 0);
        if (!android.support.design.a.isTextEmpty(channelControlConf)) {
            try {
                this.mChannelControlConf = new JSONObject(channelControlConf);
                this.c(this.mChannelControlConf);
            } catch (JSONException v0_6) {
                v0_6.printStackTrace();
            }
        }

        this.mPosterAdClickEnabled = sp.getInt("poster_ad_click_enabled", 0);
        com.ss.android.l.c.c();
    }

    public final void a(BaseUser arg1) {
    }

    public final void a(ListData listData, int arg4, String arg5) {
        String v1 = AppData.b(arg4, arg5);
        if (v1 != null) {
            if (listData != null) {
                listData = new ListData(listData);
            }

            this.bu.put(v1, listData);
        }
    }

    public final void a(Article article) {
        if (article != null) {
            this.b.add(article);
        }
    }

    public final void a(CellRef arg7) {
        if (arg7 != null && !android.support.design.a.isTextEmpty(arg7.cellId)) {
            if (this.gl != null) {
                e v0 = this.gl;
                v0.a();
                if (!v0.a.isEmpty()) {
                    this.gl.b(arg7.cellId);
                }
            }

            DBHelper v0_1 = DBHelper.getInstance(this.mContext);
            long v2 = arg7.getAdId();
            if (v2 <= 0) {
                return;
            }

            ContentValues v1 = new ContentValues();
            v1.put("ss_op_key", Integer.valueOf(116));
            v1.put("ad_id", Long.valueOf(v2));
            v0_1.asyncUpdate(v1);
        }
    }

    public final void a(AbsArticle arg5) {
        if (arg5 != null) {
            DBHelper v0 = DBHelper.getInstance(this.mContext);
            if (v0 == null) {
                return;
            }

            if (!(v0 instanceof DBHelper)) {
                return;
            }

            if (!(arg5 instanceof Article)) {
                return;
            }

            try {
                JSONObject v1 = android.support.design.a.isTextEmpty(((Article) arg5).extJson) ? new JSONObject() : new JSONObject(((Article) arg5).extJson);
                v1.put("user_like", ((Article) arg5).userLike);
                v1.put("like_count", ((Article) arg5).likeCount);
                ((Article) arg5).extJson = v1.toString();
                v0.a(((Article) arg5));
            } catch (Exception v0_1) {
            }
        }
    }

    public final void a(String arg3, long arg4) {
        b v0_1;
        if (!android.support.design.a.isTextEmpty(arg3)) {
            v0_1 = (AppData.b) this.bv.get(arg3);
            if (v0_1 == null) {
                v0_1 = new b();
                this.bv.put(arg3, v0_1);
            }

            v0_1.a = arg4;
        }
    }

    public final void a(String arg2, String arg3) {
        this.eZ.put(arg2, arg3);
    }

    public final void a(String arg10, boolean arg11) {
        long v4_1;
        int v6;
        long v2;
        Uri v7;
        long v0 = 0;
        if (!android.support.design.a.isTextEmpty(arg10)) {
            super.a(arg10, arg11);
            if (!arg11) {
                return;
            }

            try {
                v7 = Uri.parse(arg10);
                if (!"detail".equals(v7.getHost())) {
                    return;
                }

                v2 = Long.parseLong(v7.getQueryParameter("groupid"));
                v6 = 0;
                String v4 = v7.getQueryParameter("item_id");
                if (!android.support.design.a.isTextEmpty(v4)) {
                    v4_1 = Long.parseLong(v4);
                } else {
                    v4_1 = v0;
                }
                String v7_1 = v7.getQueryParameter("aggr_type");
                if (!android.support.design.a.isTextEmpty(v7_1)) {
                    v6 = Integer.parseInt(v7_1);
                }

                if (v2 <= v0) {
                    return;
                }

                this.c(new Article(v2, v4_1, v6));
            } catch (Exception v0_1) {
            }
        }
    }

    public final void onAppBackgroundSwitch(boolean background) {
        super.onAppBackgroundSwitch(background);
        CallbackCenter.notifyCallback(BaseAppData.callbackTypeNotifyAppEnterBackground, new Object[]{Boolean.valueOf(background)});
        com.bytedance.article.common.a.g.a(background);
        this.isAppForeground = !background;
        if (background) {
            this.mNetworkStatusMonitor.onPause();
            DBHelper dbHelper = DBHelper.getInstance(BaseApplication.getApplication());
            if (dbHelper != null) {
                dbHelper.h();
                dbHelper.b(122, DBHelper.class);
            }

            if (getInstance().getAbSettings().isSilenceRefreshOpen()) {
                SharedPreferences.Editor editor = this.getAppSettingSp().edit();
                editor.putLong("lite_enter_background_time", System.currentTimeMillis());
                editor.apply();
            }

            this.bq = false;
        } else {
            this.mNetworkStatusMonitor.registerNetworkStateReceiver();
            this.bq = this.meetSilenceTime();
        }
    }

    public final boolean a(Activity arg2) {
        return ((arg2 instanceof FeedTab)) || ((arg2 instanceof AbsSplashActivity));
    }

    public final boolean a(String arg4) {
        boolean v0 = false;
        if (!android.support.design.a.isTextEmpty(arg4)) {
            try {
                if (!"detail".equals(Uri.parse(arg4).getHost())) {
                    return v0;
                }

                v0 = super.a(arg4);
            } catch (Exception v1) {
            }
        }

        return v0;
    }

    public final boolean a(JSONObject jo) {
        JSONObject v0_5;
        Object v0_4;
        Iterator v5_1;
        JSONArray v2_4;
        int v0_2;
        String abVersion;
        int v9 = -2;
        String v12 = null;
        int v3 = 0;
        int v8 = -1;
        boolean v0 = super.a(jo);
        if (this.getAppSettings().tryUpdateAppSetting(jo)) {
            v0 = true;
        }

        if (this.getAbSettings().tryUpdateAppSetting(jo)) {
            v0 = true;
        }

        this.getAbSettings().afterUpdateAppSetting();
        ABHelper v5 = ABHelper.a(this.getAppContext());
        int v4 = 0;
        int v2 = 0;
        while (v4 < 4) {
            Object v6 = jo.opt(v5.a[v4]);
            if (v6 != null && (((v6 instanceof String)) || ((v6 instanceof Long))
                    || ((v6 instanceof Integer)) || ((v6 instanceof Boolean))
                    || ((v6 instanceof Float))) && !v6.equals(v5.b[v4])) {
                v5.b[v4] = v6;
                v2 = 1;
            }

            ++v4;
        }

        if (v2 != 0) {
            v0 = true;
        }

        v2 = jo.optInt("detail_report_type", v8);
        if (v2 >= 0 && v2 != this.detailReportType) {
            this.detailReportType = v2;
            abVersion = jo.optString("detail_report_text");
            if (!android.support.design.a.isTextEmpty(abVersion)) {
                this.detailReportText = abVersion;
            }

            v0 = true;
        }

        v2 = jo.optInt("essay_report_type", v8);
        if (v2 >= 0) {
            String v4_1 = jo.optString("essay_report_text");
            if (v2 != this.essayReportType) {
                this.essayReportText = v4_1;
                v0 = true;
            } else if (!android.support.design.a.isTextEquals(v4_1, this.essayReportText)) {
                this.essayReportText = v4_1;
                v0 = true;
            }
        }

        v2 = jo.optInt("main_info_structure", v8);
        if (v2 != this.mainInfoStructure) {
            this.mainInfoStructure = v2;
            v0 = true;
        }

        v2 = jo.optInt("show_list_digg", v8);
        if (v2 != v8 && v2 != this.showListDigg) {
            this.showListDigg = v2;
            v0 = true;
        }

        v2 = jo.optInt("use_tab_tip", v8);
        if (v2 != this.useTabTip) {
            this.useTabTip = v2;
            v0 = true;
        }

        v2 = jo.optInt("use_dns_mapping", v8);
        if (v2 >= 0) {
            NetworkUtils.a(v2);
        }

        v2 = jo.optInt("use_ok_http", v8);
        if (v2 != AppData.useOkHttp) {
            AppData.useOkHttp = v2;
            v0 = true;
        }

        ArticleQueryThread.a(jo.optInt("debug_stream_net_error_cnt", v8));
        if (jo.optInt("enable_anr_monitor", v8) > 0) {
            AppLog.y();
        }

        int enableTrafficGuard = jo.optInt("enable_traffic_guard", v8);
        if (enableTrafficGuard > 0) {
            AppLog.c(enableTrafficGuard);
        }

        int lazyLoadPolicy = jo.optInt("lazy_load_policy", v8);
        if (lazyLoadPolicy >= 0 && lazyLoadPolicy != this.lazyLoadPolicy) {
            this.lazyLoadPolicy = lazyLoadPolicy;
            v0 = true;
        }

        int articleExpireSeconds = jo.optInt("article_expire_seconds", v8);
        if (articleExpireSeconds != this.mArticleExpireSeconds && articleExpireSeconds > 0) {
            v0_2 = articleExpireSeconds > 3600 ? 3600 : articleExpireSeconds;
            this.mArticleExpireSeconds = v0_2;
            v0 = true;
        }

        int updateBadgeInterval = jo.optInt("update_badge_interval", v8);
        if (updateBadgeInterval != this.updateBadgeInterval && updateBadgeInterval > 0) {
            this.updateBadgeInterval = updateBadgeInterval;
            v0 = true;
        }

        int discoverPageRefreshSeconds = jo.optInt("discover_page_refresh_seconds", v8);
        if ((((long) discoverPageRefreshSeconds)) != this.discoverPageRefreshSeconds && discoverPageRefreshSeconds > 0) {
            this.discoverPageRefreshSeconds = ((long) discoverPageRefreshSeconds);
            v0 = true;
        }

        int keySellEntry = jo.optInt("key_sell_entry", v8);
        if (keySellEntry != this.keySellEntry) {
            this.keySellEntry = keySellEntry;
            v0 = true;
        }

        boolean v2_1 = jo.optInt("hack_webcore_handler", v8) > 0;
        if (v2_1 != this.mHackWebCoreHandler) {
            this.mHackWebCoreHandler = v2_1;
            v0 = true;
        }

        v2_1 = jo.optInt("hack_webcore_handler_zte", v8) > 0 ? true : false;
        if (v2_1 != this.mHackWebCoreHandlerZTE) {
            this.mHackWebCoreHandlerZTE = v2_1;
            v0 = true;
        }

        v2_1 = jo.optBoolean("is_web_view_common_query_enable");
        if (v2_1 != this.isWebViewCommonQueryEnable) {
            this.isWebViewCommonQueryEnable = v2_1;
            v0 = true;
        }

        v2_1 = jo.optInt("hack_webcore_handler_all", v8) > 0 ? true : false;
        if (v2_1 != this.mHackWebCoreHandlerAll) {
            this.mHackWebCoreHandlerAll = v2_1;
            v0 = true;
        }

        v2_1 = jo.optInt("disable_article_info_layer", v8) > 0 ? true : false;
        if (v2_1 != this.mDisableArticleInfoLayer) {
            this.mDisableArticleInfoLayer = v2_1;
            v0 = true;
        }

        String v2_2 = jo.optString("article_host_list");
        if (!android.support.design.a.isTextEquals(v2_2, this.mArticleHostList)) {
            this.mArticleHostList = v2_2;
            ArticleQueryThread.a(l(v2_2));
            v0 = true;
        }

        v2_2 = jo.optString("article_content_host_list");
        if (!android.support.design.a.isTextEquals(v2_2, this.mArticleContentHostList)) {
            this.mArticleContentHostList = v2_2;
            ArticleQueryThread.b(l(v2_2));
            AnswerQueryUtils.b(l(v2_2));
            v0 = true;
        }

        v2_2 = jo.optString("mine_sell_introduce", v12);
        if (v2_2 != null && !android.support.design.a.isTextEquals(v2_2, this.mineSellIntroduce)) {
            this.mineSellIntroduce = v2_2;
            v0 = true;
        }

        v2_2 = jo.optString("web_view_common_query_host_list", v12);
        if (v2_2 != null && !android.support.design.a.isTextEquals(v2_2, this.webViewCommonQueryHostList)) {
            this.webViewCommonQueryHostList = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("category_refresh_interval", v8);
        if (keySellEntry != this.mCategoryRefreshInterval && keySellEntry > 0) {
            this.mCategoryRefreshInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("category_tip_interval", v8);
        if (keySellEntry != this.mCategoryTipInterval && keySellEntry > 0) {
            this.mCategoryTipInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("category_tip_duration", v8);
        if (keySellEntry != this.mCategoryTipDuration && keySellEntry > 0) {
            this.mCategoryTipDuration = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("category_force_stream_interval", v8);
        if (keySellEntry != this.mCategoryForceStreamInterval && keySellEntry > 0) {
            this.mCategoryForceStreamInterval = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("open_src_with_browser_list");
        if (!android.support.design.a.isTextEquals(v2_2, this.openSrcWithBrowserList)) {
            this.openSrcWithBrowserList = v2_2;
            this.w = android.support.design.a.w(v2_2);
            v0 = true;
        }

        keySellEntry = jo.optInt("allow_download_baofeng", v8);
        if (keySellEntry != this.allowDownloadBaofeng && keySellEntry >= 0) {
            this.allowDownloadBaofeng = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("key_allow_regist_device_manager", v8);
        if (keySellEntry != this.key_allow_regist_device_manager && keySellEntry >= 0) {
            this.key_allow_regist_device_manager = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("shared_extended_object_enabled", v8);
        if (keySellEntry != this.sharedExtendedObjectEnabled && keySellEntry >= 0) {
            this.sharedExtendedObjectEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("use_image_qq_share", v8);
        if (keySellEntry != this.useImageQqShare && keySellEntry >= 0) {
            this.useImageQqShare = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("allow_dxwidget", v8);
        if (keySellEntry != this.allowDxwidget && keySellEntry >= 0) {
            this.allowDxwidget = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("send_every_item_show", v8);
        if (keySellEntry != this.sendEveryItemShow && keySellEntry >= 0) {
            this.sendEveryItemShow = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("last_read_refresh", v8);
        if (keySellEntry != this.lastReadRefresh && keySellEntry >= 0) {
            this.lastReadRefresh = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("use_old_parse_json_style", v8);
        if (keySellEntry != this.useOldParseJsonStyle && keySellEntry >= 0) {
            this.useOldParseJsonStyle = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("write_comment_hint");
        if (!android.support.design.a.isTextEquals(v2_2, this.writeCommentHint) && (jo.has("write_comment_hint"))) {
            this.writeCommentHint = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("setting_flags", v8);
        if (keySellEntry != this.settingFlags && keySellEntry >= 0) {
            this.settingFlags = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("search_button_setting_enabled", v8);
        if (keySellEntry != this.searchButtonSettingEnabled && keySellEntry >= 0) {
            this.searchButtonSettingEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("search_result_source", v8);
        if (keySellEntry != this.searchResultSource && keySellEntry >= 0) {
            this.searchResultSource = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("top_search_bar_tips_style");
        if (!android.support.design.a.isTextEmpty(v2_2) && !v2_2.equals(this.topSearchBarTipsStyle)) {
            this.topSearchBarTipsStyle = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("category_tab_white_style_enabled", v8);
        if (keySellEntry != this.categoryTabWhiteStyleEnabled && keySellEntry >= 0) {
            this.categoryTabWhiteStyleEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("comment_load_multi_tab", v8);
        if (keySellEntry != this.commentLoadMultiTab && keySellEntry >= 0) {
            this.commentLoadMultiTab = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("max_impression_count", v8);
        if (keySellEntry != this.maxImpressionCount && keySellEntry >= 0) {
            this.maxImpressionCount = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("preload_count_max", v8);
        if (keySellEntry != this.preloadCountMax && keySellEntry > 0) {
            this.preloadCountMax = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("preload_count_normal", v8);
        if (keySellEntry != this.preloadCountNormal && keySellEntry > 0) {
            this.preloadCountNormal = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("preload_count_min", v8);
        if (keySellEntry != this.preloadCountMin && keySellEntry > 0) {
            this.preloadCountMin = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("discover_url");
        if (!android.support.design.a.isTextEquals(v2_2, this.discoverUrl)) {
            this.discoverUrl = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("search_wap_mode", v8);
        if (keySellEntry != this.searchWapMode && keySellEntry >= 0) {
            this.searchWapMode = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("allow_permanent_notify", v8);
        if (keySellEntry != this.allowPermanentNotify && keySellEntry >= 0) {
            this.allowPermanentNotify = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("permanent_notify_mobile_refresh_interval", v8);
        if (keySellEntry != this.permanentNotifyMobileRefreshInterval && keySellEntry >= 0) {
            this.permanentNotifyMobileRefreshInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("permanent_notify_wifi_refresh_interval", v8);
        if (keySellEntry != this.permanentNotifyWifiRefreshInterval && keySellEntry >= 0) {
            this.permanentNotifyWifiRefreshInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("essay_comment_detail_enabled", v8);
        if (keySellEntry != this.essayCommentDetailEnabled && keySellEntry >= 0) {
            this.essayCommentDetailEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("permanent_notify_replace_interval", v8);
        if (keySellEntry != this.permanentNotifyReplaceInterval && keySellEntry >= 0) {
            this.permanentNotifyReplaceInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("permanent_notify_refresh_count", v8);
        if (keySellEntry != this.permanentNotifyRefreshCount && keySellEntry >= 0) {
            this.permanentNotifyRefreshCount = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("permanent_notify_enable", v8);
        if (keySellEntry == 0 && !this.ex) {
            this.e(false);
            v0 = true;
        } else if (keySellEntry == 1 && !this.ex) {
            this.e(true);
            v0 = true;
        }

        keySellEntry = jo.optInt("contact_dlg_show_max_add", v8);
        if (keySellEntry >= 0 && keySellEntry != this.contactDlgShowMaxAdd) {
            this.contactDlgShowMaxAdd = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("contact_dlg_show_max_update", v8);
        if (keySellEntry >= 0 && keySellEntry != this.contactDlgShowMaxUpdate) {
            this.contactDlgShowMaxUpdate = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("contact_dlg_show_max_follow", v8);
        if (keySellEntry >= 0 && keySellEntry != this.contactDlgShowMaxFollow) {
            this.contactDlgShowMaxFollow = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("contact_dlg_show_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.contactDlgShowInterval) {
            this.contactDlgShowInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("login_dlg_show_max_favor", v8);
        if (keySellEntry >= 0 && keySellEntry != this.loginDlgShowMaxFavor) {
            this.loginDlgShowMaxFavor = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("login_dlg_show_max_coment", v8);
        if (keySellEntry >= 0 && keySellEntry != this.loginDlgShowMaxComent) {
            this.loginDlgShowMaxComent = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("login_dlg_show_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.loginDlgShowInterval) {
            this.loginDlgShowInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("push_dlg_show_max", v8);
        if (keySellEntry >= 0 && keySellEntry != this.pushDlgShowMax) {
            this.pushDlgShowMax = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("push_dlg_show_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.pushDlgShowInterval) {
            this.pushDlgShowInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("per_dlg_show_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.perDlgShowInterval) {
            this.perDlgShowInterval = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("push_guide_dlg_args");
        if (!TextUtils.equals(((CharSequence) v2_2), this.pushGuideDlgArgs)) {
            this.pushGuideDlgArgs = v2_2;
            v0 = true;
        }

        v4 = jo.optInt("lbs_flags", v8);
        v2_1 = (v4 & 1) == 1 ? true : false;
        if (v2_1 != this.isSysLocaleUpload) {
            this.isSysLocaleUpload = v2_1;
            v2_1 = true;
        } else {
            v2_1 = v0;
        }

        v0 = (v4 & 2) == 2 ? true : false;
        if (v0 != this.isBaiduLocaleUpload) {
            this.isBaiduLocaleUpload = v0;
            v2_1 = true;
        }

        v0 = (v4 & 3) == 3 ? true : false;
        if (v0 != this.isGaodeLocaleUpload) {
            this.isGaodeLocaleUpload = v0;
            v2_1 = true;
        }

        v0 = (v4 & 128) == 128 ? true : false;
        if (v0 != this.isLocaleRequestGps) {
            this.isLocaleRequestGps = v0;
            v0 = true;
        } else {
            v0 = v2_1;
        }

        keySellEntry = jo.optInt("lbs_sync_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.lbsSyncInterval) {
            this.lbsSyncInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("lbs_alert_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.lbsAlertInterval) {
            this.lbsAlertInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("lbs_locate_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.lbsLocateInterval) {
            this.lbsLocateInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("forum_post_min_text_length", v8);
        if (keySellEntry >= 0 && keySellEntry < 2000 && keySellEntry != this.forumPostMinTextLength) {
            this.forumPostMinTextLength = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("article_comment_max_text_length", v8);
        if (keySellEntry >= 0 && keySellEntry != this.articleCommentMaxTextLength) {
            this.articleCommentMaxTextLength = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("traffic_track_interval_sec", v8);
        if (keySellEntry >= 0 && keySellEntry != this.trafficTrackIntervalSec) {
            this.trafficTrackIntervalSec = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("article_comment_too_long_tips");
        if (!android.support.design.a.isTextEquals(v2_2, this.articleCommentTooLongTips)) {
            this.articleCommentTooLongTips = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_ontab", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoOntab) {
            this.videoOntab = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("show_dislike_tip", v8);
        if (keySellEntry >= 0 && keySellEntry != this.showDislikeTip) {
            this.showDislikeTip = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("refresh_button_setting_enabled", v8);
        if (keySellEntry >= 0 && keySellEntry != this.refreshButtonSettingEnabled) {
            this.refreshButtonSettingEnabled = keySellEntry;
            CallbackCenter.notifyCallback(BaseAppData.callbackTypeGetRefreshButtonSetting, new Object[0]);
            v0 = true;
        }

        keySellEntry = jo.optInt("category_slide_count", v8);
        if (!this.mCategorySlideCountAssinged && keySellEntry >= 0 && keySellEntry != this.categorySlideCount) {
            this.categorySlideCount = keySellEntry;
            this.mCategorySlideCountAssinged = true;
            abVersion = "category_slide_count_assinged";
            v2_1 = this.mCategorySlideCountAssinged;
            if (!android.support.design.a.isTextEmpty(abVersion)) {
                SharedPreferenceCompat.commit(this.mContext.getSharedPreferences("app_setting", 0).edit().putBoolean(abVersion, v2_1));
            }

            v0 = true;
        }

        keySellEntry = jo.optInt("refresh_flash_count", v9);
        if (keySellEntry > v9 && keySellEntry != this.refreshFlashCount) {
            this.refreshFlashCount = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_auto_full_screen", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoAutoFullScreen) {
            this.videoAutoFullScreen = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_play_use_ipv6", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoPlayUseIpv6) {
            this.videoPlayUseIpv6 = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_player_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoPlayerFlag) {
            this.videoPlayerFlag = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_cell_show_play_count_enabled", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoCellShowPlayCountEnabled) {
            this.videoCellShowPlayCountEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_play_continue_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoPlayContinueFlag) {
            this.videoPlayContinueFlag = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_auto_play_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoAutoPlayFlag) {
            this.videoAutoPlayFlag = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_auto_play_mode", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoAutoPlayModeLocalSp) {
            this.videoAutoPlayModeLocalSp = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("enable_video_tab_bubble", v8);
        if (keySellEntry >= 0 && keySellEntry != this.enableVideoTabBubble) {
            this.enableVideoTabBubble = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_tab_bubble_interval", v8);
        if (keySellEntry >= 0 && keySellEntry != this.videoTabBubbleInterval) {
            this.videoTabBubbleInterval = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("enable_account_v2", v8);
        if (keySellEntry >= 0 && keySellEntry != this.enableAccountV2) {
            this.enableAccountV2 = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("quick_login", v8);
        if (keySellEntry >= 0 && keySellEntry != this.quickLogin) {
            this.quickLogin = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("read_weixin_name", v8);
        if (keySellEntry >= 0 && keySellEntry != this.readWeixinName) {
            this.readWeixinName = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("ss_sync_after_login", v8);
        if (keySellEntry >= 0 && keySellEntry != this.ssSyncAfterLogin) {
            this.ssSyncAfterLogin = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("register_page_title");
        if (!android.support.design.a.isTextEquals(v2_2, this.registerPageTitle)) {
            this.registerPageTitle = v2_2;
            v0 = true;
        }

        v2_2 = jo.optString("register_button_text");
        if (!android.support.design.a.isTextEquals(v2_2, this.registerButtonText)) {
            this.registerButtonText = v2_2;
            v0 = true;
        }

        v2_2 = jo.optString("login_page_title");
        if (!android.support.design.a.isTextEquals(v2_2, this.loginPageTitle)) {
            this.loginPageTitle = v2_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("detail_search_tab_style", v8);
        if (keySellEntry >= 0 && keySellEntry != this.detailSearchTabStyle) {
            this.detailSearchTabStyle = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("is_recommend_self_allowed", v8);
        if (keySellEntry >= 0 && keySellEntry != this.isRecommendSelfAllowed) {
            this.isRecommendSelfAllowed = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("resize_web_view", v8);
        if (keySellEntry >= 0 && keySellEntry != this.resizeWebView) {
            this.resizeWebView = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("re_add_web_view", v8);
        if (keySellEntry >= 0 && keySellEntry != this.reAddWebView) {
            this.reAddWebView = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("launch_show_count", v8);
        if (keySellEntry > 0 && keySellEntry != this.launchShowCount && this.launchShowCount <= 0) {
            this.launchShowCount = keySellEntry;
            v0 = true;
        }

        v2_2 = jo.optString("forum_settings");
        if (!android.support.design.a.isTextEquals(v2_2, this.forumSettings)) {
            this.forumSettings = v2_2;
            v0 = true;
        }

        v2_2 = jo.optString("wenda_settings");
        if (!android.support.design.a.isTextEquals(v2_2, this.wendaSettings)) {
            this.wendaSettings = v2_2;
            this.m(this.wendaSettings);
            v0 = true;
        }

        if (android.support.design.a.isTextEmpty(this.mAnswerHostList)) {
            this.m(this.wendaSettings);
        }

        v2_2 = jo.optString("js_actlog_url");
        if (!android.support.design.a.isTextEquals(v2_2, this.jsActlogUrl)) {
            this.jsActlogUrl = v2_2;
            v0 = true;
        }

        long v4_2 = AppData.getLong(jo, "refresh_ad_expire_sec");
        if (v4_2 > -1 && v4_2 != this.refreshAdExpireSec) {
            this.refreshAdExpireSec = v4_2;
            v0 = true;
        }

        v2_1 = jo.optInt("refresh_ad_disable", v8) > 0 ? true : false;
        if (v2_1 != this.refreshAdDisable) {
            this.refreshAdDisable = v2_1;
            v0 = true;
        }

        keySellEntry = jo.optInt("enable_wap_profile", v8);
        if (keySellEntry >= 0 && keySellEntry != this.enableWapProfile) {
            this.enableWapProfile = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("enable_wap_report", v8);
        if (keySellEntry >= 0 && keySellEntry != this.enableWapReport) {
            this.enableWapReport = keySellEntry;
            v0 = true;
        }

        float v4_3 = ((float) jo.optDouble("web_transform_delay_sec_float"));
        if (v4_3 > 0f && (((float) keySellEntry)) != this.webTransformDelaySecFloat) {
            this.webTransformDelaySecFloat = v4_3;
            v0 = true;
        }

        v2_1 = jo.optInt("disable_web_transform", v8) > 0 ? true : false;
        if (v2_1 != this.mDisableWebTransform) {
            this.mDisableWebTransform = v2_1;
            v0 = true;
        }

        v2_2 = jo.optString("feed_text_max_line");
        if (!android.support.design.a.isTextEquals(v2_2, this.mFeedTextMaxLine)) {
            this.mFeedTextMaxLine = v2_2;
            n(this.mFeedTextMaxLine);
            v0 = true;
        }

        try {
            v2_4 = jo.optJSONArray("essay_report_options");
            if (v2_4 != null) {
                v2_2 = v2_4.toString();
                if (!android.support.design.a.isTextEquals(this.essayReportOptions, v2_2)) {
                    this.essayReportOptions = v2_2;
                    this.N = null;
                    v0 = true;
                }
                v2_1 = v0;
                v0_2 = 1;
            } else {
                v2_1 = v0;
                v0_2 = 0;
            }
            int v13 = v0_2;
            v0 = v2_1;
            keySellEntry = v13;
        } catch (Exception v2_3) {
            keySellEntry = 0;
        }

        if (keySellEntry == 0) {
            this.essayReportOptions = v12;
            this.N = ((List) null);
        }

        keySellEntry = jo.optInt("video_redspot_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoRedSpotFlag) {
            this.mVideoRedSpotFlag = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("enable_baidu_profile", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mEnableBaiduProfile) {
            this.mEnableBaiduProfile = keySellEntry;
            v0 = true;
        }

        v4_2 = getLong(jo, "video_redspot_version");
        if (v4_2 > -1 && v4_2 != this.mVideoRedSpotVersion) {
            this.mVideoRedSpotVersion = v4_2;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_shortcut_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoShortCutFlag) {
            this.mVideoShortCutFlag = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_preloading_flag", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoPreloadingFlag) {
            this.mVideoPreloadingFlag = keySellEntry;
            v0 = true;
        }

        this.bd = jo.optInt("retry_net_timeout_switch", 1);
        keySellEntry = jo.optInt("video_preloading_size", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoPreloadingSize) {
            this.mVideoPreloadingSize = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_accelerometer_rotation", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoAccelerometerRotation) {
            this.mVideoAccelerometerRotation = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("video_keep_pos", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mVideoKeepPos) {
            this.mVideoKeepPos = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("poster_ad_click_enabled", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mPosterAdClickEnabled) {
            this.mPosterAdClickEnabled = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("lite_category_refresh", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mLiteCategoryRefresh) {
            this.mLiteCategoryRefresh = keySellEntry;
            v0 = true;
        }

        keySellEntry = jo.optInt("show_lite_subentrance_list", v8);
        if (keySellEntry >= 0 && keySellEntry != this.mShowLiteSubEntranceList) {
            this.mShowLiteSubEntranceList = keySellEntry;
            v0 = true;
        }

        v2_4 = jo.optJSONArray("temai_url_list");
        if (v2_4 != null) {
            v2_2 = v2_4.toString();
            if (!android.support.design.a.isTextEquals(v2_2, AppData.mTemiUrlList)) {
                AppData.mTemiUrlList = v2_2;
                v0 = true;
            }
        }

        JSONObject v2_5 = jo.optJSONObject("channel_control_conf");
        if (v2_5 != null) {
            this.mChannelControlConf = v2_5;
            this.c(v2_5);
            v2_1 = true;
        } else {
            v2_1 = v0;
        }

        jo.optInt("key_show_cocos_play_game", v8);
        JsConfigHelper v0_3 = this.mJsConfigHelper;
        if (v0_3.c != null) {
            v5_1 = v0_3.c.entrySet().iterator();
            v4 = 0;
            while (v5_1.hasNext()) {
                v0_4 = ((Map.Entry) v5_1.next()).getValue();
                v0_2 = v0_4 != null ? (((JsConfigHelper.d) v0_4).a(jo) ? 1 : 0) | v4 : v4;
                v4 = v0_2;
            }
        } else {
            v4 = 0;
        }

        label_1074:
        if (v4 != 0) {
            v2_1 = true;
        }

        if (this.T != null) {
            this.T.get();
        }

        if (jo == null || !jo.has("list_ui_option")) {
            this.mListUiOption = "";
            v0_2 = 1;
        } else {
            v0_5 = jo.optJSONObject("list_ui_option");
            if (v0_5 == null) {
                this.mListUiOption = "";
                v0_2 = 1;
            } else {
                abVersion = v0_5.toString();
                if (!abVersion.equals(this.mListUiOption)) {
                    this.mListUiOption = abVersion;
                    v0_2 = 1;
                } else {
                    v0_2 = 0;
                }
            }
        }

        if (v0_2 != 0) {
            v2_1 = true;
        }

        Logger.d("setting_data", jo.toString());
        if (jo == null || !jo.has("detail_ui_option")) {
            this.mDetailUiOption = "";
            v0_2 = 1;
        } else {
            v0_5 = jo.optJSONObject("detail_ui_option");
            if (v0_5 == null) {
                this.mDetailUiOption = "";
                v0_2 = 1;
            } else {
                abVersion = v0_5.toString();
                if (!abVersion.equals(this.mDetailUiOption)) {
                    this.mDetailUiOption = abVersion;
                    v0_2 = 1;
                } else {
                    v0_2 = 0;
                }
            }
        }

        if (v0_2 != 0) {
            v2_1 = true;
        }

        abVersion = jo.optString("login_dialog_strategy");
        if (!android.support.design.a.isTextEquals(abVersion, this.mLoginDialogStrategy)) {
            this.mLoginDialogStrategy = abVersion;
            v2_1 = true;
        }

        this.gp = jo.optInt("android_native_crash_switch", 1);
        this.go = jo.optInt("android_anr_monitor_switch", 1);
        System.currentTimeMillis();
        AbManager v4_4 = AbManager.getInstance(this.appContext);
        if ((v4_4.c) && jo != null && jo.length() > 0) {
            SharedPreferences v5_2 = v4_4.getAppSettingsSp();
            SharedPreferences.Editor editor = v5_2.edit();
            abVersion = jo.optString("ab_version");
            if (!android.support.design.a.isTextEquals(abVersion, v4_4.abVersion)) {
                v4_4.abVersion = abVersion;
                editor.putString("ab_version", v4_4.abVersion);
                v3 = 1;
            }

            JSONObject v7 = jo.optJSONObject("ab_settings");
            if (!v4_4.a.isEmpty() && v7 != null && v7.length() > 0) {
                Iterator v8_1 = v4_4.a.keySet().iterator();
                while (v8_1.hasNext()) {
                    v0_4 = v8_1.next();
                    String v9_1 = v7.optString(((String) v0_4));
                    if (android.support.design.a.isTextEmpty(v9_1)) {
                        continue;
                    }

                    if (android.support.design.a.isTextEquals(v9_1, v5_2.getString(((String) v0_4), ""))) {
                        continue;
                    }

                    editor.putString(((String) v0_4), v9_1);
                    if (Logger.debug()) {
                        Logger.d("AbManager", "extractServerConfig: " + (((String) v0_4)) + " = " + v9_1);
                    }

                    v3 = 1;
                }
            }

            if (v3 == 0) {
            } else {
                editor.apply();
                v4_4.d = v12;
                v4_4.b();
                v4_4.b.a();
            }
        }
        if (!this.gn) {
            new com.ss.android.article.base.app.c(this, "init_anr_trace_hijack").start();
        }

        return v2_1;
    }

    public final boolean a(JSONObject arg7, boolean arg8) {
        int v5 = 2;
        int v4 = -1;
        boolean v0 = super.a(arg7, arg8);
        if (arg8) {
            int v2 = arg7.optInt("comment_mode", v4);
            if (this.mListCommentPref == 0 && v2 > 0 && v2 <= v5) {
                this.mListCommentPref = v2;
                v0 = true;
            }

            v2 = arg7.optInt("refresh_mode", v4);
            if (this.mRefreshListPref == 0 && v2 > 0 && v2 <= v5) {
                this.mRefreshListPref = v2;
                v0 = true;
            }

            v2 = arg7.optInt("flow_mode", v4);
            if (this.mLoadImagePref == 0 && v2 > 0 && v2 <= v5) {
                this.mLoadImagePref = v2;
                v0 = true;
            }

            v2 = arg7.optInt("font_size", v4);
            if (this.mFontSizePref == 0 && v2 > 0 && v2 <= 3) {
                this.mFontSizePref = v2;
                v0 = true;
            }

            v2 = arg7.optInt("back_refresh", v4);
            if (this.mBackRefresh) {
                return v0;
            }

            if (v2 != 1) {
                return v0;
            }

            this.mBackRefresh = true;
            v0 = true;
        }

        return v0;
    }

    public final boolean shouldShow() {
        return true;
    }

    public final Class ab() {
        return AdsAppActivity.class;
    }

    public final String ac() {
        return "{\"qzone_sns\": \"【{title:50}】（分享自＃柠檬浏览器＃）\"," +
                "\"sina_weibo\": \"【{title:50}】（分享自@柠檬浏览器）\"," +
                "\"qq_weibo\": \"【{title:50}】（分享自@柠檬浏览器）\"," +
                "\"renren_sns\": \"【{title:50}】（分享自@柠檬浏览器）\"," +
                "\"kaixin_sns\": \"【{title:50}】（分享自@柠檬浏览器）\"}";
    }

    public final String getSSJSResAssetsDir() {
        if (mJsConfigHelper.c != null) {
            Object v0_1 = mJsConfigHelper.c.get(Integer.valueOf(0));
            if (v0_1 != null) {
                return ((JsConfigHelper.d) v0_1).d();
            } else {
                return null;
            }
        } else {
            return null;
        }
    }

    public final String ae() {
        String v0_2;
        if (mJsConfigHelper.c != null) {
            Object v0_1 = mJsConfigHelper.c.get(Integer.valueOf(1));
            if (v0_1 != null) {
                v0_2 = ((JsConfigHelper.d) v0_1).e();
            } else {
                return null;
            }
        } else {
            v0_2 = null;
        }

        return v0_2;
    }

    public final Class af() {
        return null;
    }

    public final boolean isShareExtendedObjectEnabled() {
        return this.sharedExtendedObjectEnabled > 0;
    }

    public static void ah() {
    }

    public static long ai() {
        return 0;
    }

    public final String getEventSenderHost() {
        if (System.currentTimeMillis() - this.eventSenderHostRecordTime > 172800000) {
            this.eventSenderHost = "";
            this.eventSenderHostRecordTime = 0;
        }
        return this.eventSenderHost;
    }

    public final String userAgent() {
        String v1 = System.getProperty("http.agent");
        if (!android.support.design.a.isTextEmpty(v1)) {
            String v0 = AppLog.p();
            if (android.support.design.a.isTextEmpty(v0)) {
                v0 = this.appContext != null ? this.appContext.getVersion() : null;
            }

            v0 = !android.support.design.a.isTextEmpty(v0) ? v1 + " NewsArticle/" + v0 : v1;
            v1 = v0;
        }

        return v1;
    }

    public static boolean isNightMode() {
        return com.ss.android.j.b.isNightModeToggled();
    }

    public final boolean videoPlayUseIpV6() {
        return this.videoPlayUseIpv6 == 1;
    }

    public final boolean an() {
        return this.videoPlayerFlag == 0;
    }

    public final boolean videoAutoPlay() {
        return PluginInstaller.isCommonPluginLiteInstalled() && this.videoAutoPlayFlag == 1;
    }

    public final boolean isVideoAccelerated() {
        return this.mVideoAccelerometerRotation != 0;
    }

    public final boolean aq() {
        return this.resizeWebView != 0;
    }

    public final boolean ar() {
        return this.reAddWebView != 0;
    }

    public static void as() {
    }

    public final AppSettings getAppSettings() {
        if (this.mAppSettings == null) {
            Logger.w("AppSettings is null.");
            this.mAppSettings = new AppSettings();
        }

        return this.mAppSettings;
    }

    public final AbSettings getAbSettings() {
        if (this.mAbSettings == null) {
            Logger.w("AbSettings is null.");
            this.mAbSettings = new AbSettings();
        }

        return this.mAbSettings;
    }

    public static boolean av() {
        boolean v0;
        if (com.ss.android.l.a.a() < 4) {
            v0 = false;
        } else if (com.ss.android.l.a.b() < 2000000) {
            v0 = false;
        } else if (!((Boolean) com.ss.android.l.a.a(BizApplication.getApplication()).second).booleanValue()) {
            v0 = true;
        } else {
            v0 = false;
        }

        return v0;
    }

    private void aw() {
        EventSender.inst().mHost = this.eventSenderHost;
        EventSender.inst().setSenderEnable(true);
    }

    static int b(AppData arg1) {
        return arg1.gp;
    }

    private static String b(int arg2, String arg3) {
        String v0;
        switch (arg2) {
            case 1: {
                v0 = "_recent_" + arg3;
                break;
            }
            case 2: {
                v0 = "_favor_";
                break;
            }
            case 3: {
                v0 = "_search_";
                break;
            }
            case 4: {
                v0 = "_pgc_";
                break;
            }
            case 8: {
                v0 = "_read_history_";
                break;
            }
            case 9: {
                v0 = "_push_history_";
                break;
            }
            case 10: {
                v0 = "_refresh_history_";
                break;
            }
            default: {
                v0 = null;
                break;
            }
        }

        return v0;
    }

    public final void setClickShowLargeImageBtn(int clickShowLargeImageBtn) {
        this.clickShowLargeImageBtn = clickShowLargeImageBtn;
        SharedPreferences.Editor editor = this.mContext.getSharedPreferences("app_setting", 0).edit();
        editor.putInt("click_show_large_image_btn", this.clickShowLargeImageBtn);
        SharedPreferenceCompat.commit(editor);
    }

    public final void b(long arg4) {
        if (arg4 >= 0 && arg4 == this.gr) {
            Object v0 = null;
            try {
                if (this.cF != null) {
                    v0 = this.cF.get();
                }

                String v1 = "video_app_download";
                if (v0 != null) {
                    MobClickCombiner.onEvent(((Context) v0), "detail", v1);
                } else {
                    AppLog.a("umeng", "detail", v1);
                }
            } catch (Exception v0_1) {
            }

            try {
                if (this.gq != null) {
                    return;
                }

                this.gq = new AppData.a$c(this, (byte) 0);
                IntentFilter v0_2 = new IntentFilter();
                v0_2.addAction("android.intent.action.PACKAGE_ADDED");
                v0_2.addDataScheme("package");
                this.mContext.registerReceiver(this.gq, v0_2);
            } catch (Exception v0_1) {
            }
        }
    }

    public final void b(Activity arg13) {
        int v0_3;
        long v2;
        long v10 = 0;
        if (this.e(arg13)) {
            this.g(arg13);
            AlertManager v0 = this.mAlertManager;
            if (!(arg13 instanceof AbsSplashActivity)) {
                v2 = System.currentTimeMillis();
                v0.a(v10);
                if (v2 - v0.j > 1800000) {
                    v0.j = v2;
                    FeedbackActivity.a(v0.a, v0.d, v0.b);
                }

                v0.i.resume();
                v0.g.onPause();
            }

            Spipe v0_1 = Spipe.inst();
            if (v0_1.z != v0_1.A) {
                v2 = System.currentTimeMillis();
                if (v0_1.z == v0_1.B || v2 - v0_1.C <= 25000) {
                    if (v0_1.z != v0_1.B) {
                    } else if (v2 - v0_1.C > 1200000) {
                        if ((arg13 instanceof AuthorizeActivity)) {
                        } else if ((arg13 instanceof AuthActivity)) {
                        } else if (!NetworkUtils.isNetworkAvailable(((Context) arg13))) {
                        } else {
                            v0_1.A = v0_1.z;
                            v0_1.a(((Context) arg13), v0_1.A, 0);
                        }
                    }
                }


            }
            AdManager v0_2 = AdManager.getInstance(this.mContext);
            if (!v0_2.e) {
                v2 = System.currentTimeMillis();
                if (v2 - v0_2.c > 3600000 && v2 - v0_2.d > 120000 && (NetworkUtils.isNetworkAvailable(v0_2.mContext))) {
                    v0_2.e = true;
                    v0_2.d = v2;
                    int v1 = v0_2.e();
                    v0_2.mContext.getResources().getBoolean(com.ss.android.article.browser.R.bool.v);
                    new com.ss.android.b.d(v0_2, "AppAd-Thread", Priority.LOW, v1).start();
                }
            }

            InstalledAppTracker2.a(((Context) arg13));
            LocationHelper.getInstance(((Context) arg13)).a();
        }

        if ((this.needSendInfoStructure) && System.currentTimeMillis() - this.em >= 300000 && (NetworkUtils.isNetworkAvailable(this.mContext))) {
            v0_3 = this.lastInfoStructure;
            if (v0_3 < 0 || v0_3 > 2) {
                v0_3 = 0;
            }

            this.em = System.currentTimeMillis();
            try {
                JSONObject v1_1 = new JSONObject();
                if (this.needSendInfoStructure) {
                    v1_1.put("main_info_structure", v0_3);
                }

                v1_1.put("current_info_structure", v0_3);
                new com.ss.android.newmedia.j.b(this.mContext, this.mWeakHandler, v1_1.toString()).start();
                MobClickCombiner.onEvent(this.mContext, "info_structure", "current", ((long) v0_3), 0);
            } catch (Exception v0_4) {
            }
        }

        boolean v1_2 = ((MediaAppData) this).mContext.getSharedPreferences("app_setting", 0).getBoolean("send_user_settings_result", false);
        v0_3 = System.currentTimeMillis() - ((MediaAppData) this).mContext.getSharedPreferences("app_setting", 0).getLong("last_send_user_settings_time", v10) >= 86400000 ? 1 : 0;
        if (!v1_2 || v0_3 != 0) {
            super.d(true);
        }

        if (((arg13 instanceof AbsSplashActivity)) && (this.e(arg13))) {
            RefreshAdManager.a(((Context) arg13)).a(false);
        }

        if ((arg13 instanceof FeedTab)) {
            LocationUploadHelper v0_5 = LocationUploadHelper.a(((Context) arg13));
            if (Logger.debug()) {
                Logger.d("LocationUploadHelper", "tryStartUploadJob");
            }

            v2 = System.currentTimeMillis();
            if (v2 >= v0_5.k + (((long) (v0_5.l * 1000)))) {
                v0_5.a();
                v0_5.n = false;
            } else if ((v0_5.n) && v2 >= v0_5.k + (((long) v0_5.o)) * 60000) {
                v0_5.a();
            }

            this.h(arg13);
        }

        System.currentTimeMillis();
        if (com.ss.android.article.base.utils.f.a) {
            com.ss.android.article.base.utils.f.a(arg13);
        }

        SsRedbadgeManager.inst(((Context) arg13)).onResume();
        this.mJsConfigHelper.a();
    }

    public final void b(Context context) {
        int v6 = -1;
        int v0 = 1;
        if (this.gm == v6) {
            this.gm = context.getSharedPreferences("app_setting", 0).getInt("appdata_init_guard", 0);
        }

        if (this.gm != 0) {

        } else if (!(context instanceof Service)) {
            if ((context instanceof Activity)) {
                this.gm = 1;
                context.getSharedPreferences("app_setting", 0).edit().putInt("appdata_init_guard", 1).apply();
            } else {
            }
        }

        SharedPreferences v2 = context.getSharedPreferences("app_setting", 0);
        if (v2 != null) {
            int v2_1 = v2.getInt("last_version_code", 0);
            if (v2_1 < this.cD) {
                Logger.d("ab_test", "lastVersion:" + v2_1 + "; currVersion:" + this.cD);
                AppData.a(context, 521, "category_tab_white_style_enabled", 1);
                v2 = context.getSharedPreferences("app_setting", 0);
                if (v2 != null) {
                    if (this.B() != 1) {
                        v0 = 0;
                    }

                    if (v0 == 0) {
                        Logger.d("ab_test", "trySearchIconShowABTest; exit becauseof old structer");
                    } else {
                        v0 = v2.getInt("search_button_setting_enabled", v6);
                        if (v0 > 0) {
                            Logger.d("ab_test", "trySearchIconShowABTest; exit becauseof having set searchIconShow: " + v0);
                        } else if ((v2.getInt("setting_flags", 0) & 1) > 0) {
                            Logger.d("ab_test", "trySearchIconShowABTest; exit becauseof having set category_menu ");
                        } else {
                            a(context, 522, "search_button_setting_enabled", 2);
                        }
                    }
                }
            }
        }

        super.b(context);
        if ((context instanceof Activity)) {
            com.ss.android.j.b.isNightModeToggled();
        }

        if (((context instanceof Activity)) && (this.a((Activity) context))) {
            return;
        }

        AppData.tryInitCanDelayed(context);
    }

    public final void b(Article arg2) {
        if (arg2 != null) {
            this.b.remove(arg2);
        }
    }

    public final void b(String arg3, long arg4) {
        String v1 = null;
        if (!android.support.design.a.isTextEmpty(arg3)) {
            Object v0 = this.bv.get(arg3);
            if (v0 != null) {
                ((b) v0).f = v1;
                ((b) v0).g = v1;
                ((b) v0).e = arg4;
            }
        }
    }

    public final void b(boolean arg5) {
        int v0;
        String v3;
        int v1 = 1;
        super.b(arg5);
        if ((arg5) || !this.cR.isEmpty()) {
            if ((arg5) || (this.cR.contains("font_size"))) {
                this.a("font_size", this.mFontSizePref);
            }

            if ((arg5) || (this.cR.contains("comment_mode"))) {
                this.a("comment_mode", this.mListCommentPref);
            }

            if ((arg5) || (this.cR.contains("refresh_mode"))) {
                this.a("refresh_mode", this.mRefreshListPref);
            }

            if ((arg5) || (this.cR.contains("flow_mode"))) {
                this.a("flow_mode", this.mLoadImagePref);
            }

            if ((arg5) || (this.cR.contains("switch_domain"))) {
                v3 = "switch_domain";
                v0 = this.mSwitchDomain ? 1 : 0;
                this.a(v3, v0);
            }

            if ((arg5) || (this.cR.contains("permanent"))) {
                v3 = "permanent";
                v0 = this.permanentNotifyEnable ? 1 : 0;
                this.a(v3, v0);
            }

            if ((arg5) || (this.cR.contains("keep_notification"))) {
                v3 = "keep_notification";
                v0 = this.gc ? 1 : 0;
                this.a(v3, v0);
            }

            if (!arg5 && !this.cR.contains("back_refresh")) {
                return;
            }

            String v0_1 = "back_refresh";
            if (!this.mBackRefresh) {
                v1 = 0;
            }

            this.a(v0_1, v1);
        }
    }

    public final boolean b(String arg9) {
        long v2;
        boolean v0;
        if (android.support.design.a.isTextEmpty(arg9)) {
            v0 = false;
        } else {
            Object v0_1 = this.bv.get(arg9);
            if (this.fZ.containsKey(arg9)) {
                v2 = ((long) ((Integer) this.fZ.get(arg9)).intValue());
                if (v2 == 0) {
                    return true;
                }
            } else {
                v2 = this.L();
            }

            long v6 = System.currentTimeMillis();
            if (v0_1 != null && v6 - ((b) v0_1).a < v2 * 1000) {
                return true;
            }

            v0 = false;
        }

        return v0;
    }

    static Context c(AppData arg1) {
        return arg1.mContext;
    }

    private void c(final Article arg2) {
        if (this.mContext != null) {
            new AbsApiThread() {
                public final void run() {
                    DBHelper dbHelper;
                    boolean v0 = true;
                    try {
                        if (!NetworkUtils.isNetworkAvailable(AppData.this.mContext)) {
                            return;
                        }

                        dbHelper = DBHelper.getInstance(AppData.this.mContext);
                        ArticleDetail articleDetail = dbHelper.queryArticleDetail(arg2, true);
                        if (articleDetail != null) {
                            if (!android.support.design.a.isTextEmpty(articleDetail.content)) {
                                return;
                            } else if (articleDetail.article != null) {
                                if (!articleDetail.article.hasArticleUrl()) {
                                } else {
                                    return;
                                }
                            }
                        }

                        if (articleDetail != null && articleDetail.article != null) {
                            v0 = false;
                        }
                        ArticleQueryThread.getArticleDetail(dbHelper, arg2, v0, null);
                    } catch (Throwable throwable) {
                        throwable.printStackTrace();
                    }
                }
            }.start();
        }
    }

    private void c(JSONObject arg5) {
        if (arg5 != null) {
            JSONObject v0 = arg5.optJSONObject("hotsoon");
            if (v0 != null) {
                this.fZ.put("hotsoon", Integer.valueOf(v0.optInt("auto_refresh_interval")));
                this.be.put("hotsoon", Boolean.valueOf(v0.optBoolean("show_last_read")));
            }
        }
    }

    public final SSDBHelper getDBHelper() {
        return DBHelper.getInstance(this.mContext);
    }

    public final void setVivoMultiWindowActive(int isVivoMultiWindowActive) {
        this.isVivoMultiwindow = isVivoMultiWindowActive;
        SharedPreferences.Editor editor = this.mContext.getSharedPreferences("app_setting", 0).edit();
        editor.putInt("is_vivo_multiwindow", this.isVivoMultiwindow);
        SharedPreferenceCompat.commit(editor);
    }

    public final void onActivityResumed(Activity activity) {
        com.ss.android.l.c.c();
        if (((activity instanceof AbsActivity)) && (((AbsActivity) activity).enableMobClick())) {
            MobClickCombiner.onResume(((Context) activity));
        }

        long v4 = System.currentTimeMillis();
        this.cF = new WeakReference(activity);
        this.cI = v4;
        if (v4 - this.cJ > 180000) {
            this.cH = 0;
        }

        if (!this.cK) {
            return;
        }

        if (!this.e(activity)) {
        } else {
            AlertManager v3 = this.mAlertManager;
            if ((activity instanceof AbsSplashActivity)) {
            } else {
                v4 = System.currentTimeMillis();
                if (v4 - v3.k <= 900000) {
                } else if (!NetworkUtils.isNetworkAvailable(v3.a)) {
                } else {
                    boolean v0_2 = true;
                    try {
                        List v0_1 = v3.a.getPackageManager().queryIntentActivities(new Intent("android.intent.action.VIEW",
                                Uri.parse("market://details?id=com.ss.android.example")), 65536);
                        if (v0_1 == null) {
                            v0_2 = false;
                        } else if (v0_1.isEmpty()) {
                            v0_2 = false;
                        }
                        v3.k = v4;
                        new com.ss.android.newmedia.j.a(v3.a, v3.b, v0_2).start();
                    } catch (Exception v0) {
                    }
                }
            }


            if (this.cb != -1 && ((activity instanceof Activity))) {
                Activity v0_3 = activity;
                int v1 = (this).cb;
                if (v0_3 == null) {
                } else {
                    try {
                        WindowManager.LayoutParams v2 = v0_3.getWindow().getAttributes();
                        v2.screenBrightness = Float.valueOf(((float) v1)).floatValue() * 0.003922f;
                        v0_3.getWindow().setAttributes(v2);
                    } catch (Exception v0) {
                    }
                }
            }

            com.ss.android.c.a v0_4 = com.ss.android.c.a.b();
            if (!com.ss.android.c.a.a.get()) {
                LinkedHashSet v1_1 = v0_4.b;
                synchronized (v1_1) {
                    if (!v0_4.b.isEmpty() && (com.ss.android.c.a.a.compareAndSet(false, true))) {
                        new com.ss.android.c.a.a$a(v0_4).start();
                    }
                }
            }
        }
        if (!this.a(activity)) {
            this.b(activity);
        }
    }

    public final void c(Context context) {
        int v1 = 1;
        if ((context instanceof AbsSplashActivity)) {
            boolean v0 = ((MediaAppData) this).lastVersionCode == 0 ? true : false;
            this.eR = v0;
            if (this.eR) {
                int v0_1 = this.appContext.getVersionCode();
                SharedPreferences.Editor v3 = this.mContext.getSharedPreferences("app_setting", 0).edit();
                v3.putInt("first_version_code", v0_1);
                SharedPreferenceCompat.commit(v3);
            }

            if ((this.C() & 1) <= 0) {
                v1 = 0;
            }

            if (v1 == 0) {
            } else {
                this.abArchitectureType = 2;
                android.support.design.a.t = false;
            }
        }
        super.c(context);
    }

    public final boolean c(String arg11) {
        int v6;
        long v4;
        long v2_1;
        String v0_2;
        Uri v1;
        long v8 = 0;
        boolean v0 = true;
        if (!super.c(arg11)) {
            try {
                v1 = Uri.parse(arg11);
                String v2 = v1.getScheme();
                if (v2 == null) {
                    return false;
                }

                if (!v2.equals("sslocal") && !v2.equals("localsdk") && !v2.equals(AdsAppBaseActivity.b())) {
                    return false;
                }

                if (!"detail".equals(v1.getHost())) {
                    if (!AdsAppActivity.a(v1.getHost())) {
                        return v0;
                    }

                    return false;
                }

                v0_2 = v1.getQueryParameter("groupid");
                v2_1 = -1;
                if (!android.support.design.a.isTextEmpty(v0_2)) {
                    v2_1 = Long.valueOf(v0_2).longValue();
                }

                v0_2 = v1.getQueryParameter("item_id");
                if (!android.support.design.a.isTextEmpty(v0_2)) {
                    v4 = Long.valueOf(v0_2).longValue();
                } else {
                    v4 = v8;
                }
                v0_2 = v1.getQueryParameter("aggr_type");
                if (!android.support.design.a.isTextEmpty(v0_2)) {
                    v6 = Integer.valueOf(v0_2).intValue();
                } else {
                    v6 = 0;
                }
                if (v2_1 <= v8) {
                    return false;
                }

                DBHelper v0_3 = DBHelper.getInstance(this.mContext);
                if (v0_3 == null) {
                    return false;
                }

                v0 = v0_3.e(new Article(v2_1, v4, v6));
            } catch (Exception v0_1) {
                label_63:
                v0 = false;
            }
        }

        return v0;
    }

    static boolean d(AppData arg1) {
        arg1.gn = true;
        return true;
    }

    public final JsObject createJsObject(Context context) {
        return new TTAndroidObject(this, context);
    }

    public final void d(String arg3) {
        if (arg3 != null && !arg3.equals(this.eventSenderHost)) {
            this.eventSenderHost = arg3;
            this.eventSenderHostRecordTime = System.currentTimeMillis();
            this.cL = true;
        }

        if (android.support.design.a.isTextEmpty(arg3)) {
            EventSender.inst().mHost = this.eventSenderHost;
            EventSender.inst().setSenderEnable(false);
        } else {
            this.aw();
        }
    }

    static Context e(AppData arg1) {
        return arg1.mContext;
    }

    public static void tryInitCanDelayed(Context context) {
        SubscribeManager.init(context);
        AppConfig.getInstance(context).a(context instanceof Activity);
        Logger.i("Appdata-tryInitCanDelayed");
    }

    private void e(boolean arg4) {
        this.cR.add("permanent");
        this.permanentNotifyEnable = arg4;
        this.ex = true;
        this.cL = true;
    }

    public final Article e(String arg2) {
        Object v0;
        if (this.bt != null) {
            v0 = this.bt.a(arg2);
        } else {
            v0 = null;
        }

        return ((Article) v0);
    }

    static Context f(AppData arg1) {
        return arg1.mContext;
    }

    public final String f(String arg3) {
        com.ss.android.j.b.isNightModeToggled();
        if (!android.support.design.a.isTextEmpty(arg3) && arg3.indexOf("tt_daymode=") <= 0) {
            StringBuilder v1 = new StringBuilder(arg3);
            String v0 = v1.indexOf("#") > 0 ? "&" : "#";
            v1.append(v0);
            v1.append("tt_daymode=1");
            arg3 = v1.toString();
        }

        return arg3;
    }

    public final boolean isTTEngineEnable() {
        if (android.support.design.a.isTest()) {
            return this.mUseTTEngine;
        } else {
            if (!this.hasFetchTTEngineEnable) {
                this.isTTEngineEnable = this.getAppSettings().isTTEngineEnable();
                this.hasFetchTTEngineEnable = true;
            }

            return isTTEngineEnable;
        }
    }

    static Context g(AppData arg1) {
        return arg1.mContext;
    }

    public final String g(String arg2) {
        return (String) this.eZ.get(arg2);
    }

    public final boolean isTTPlayerEnable() {
        if (android.support.design.a.isTest()) {
            return this.mUseTTPlayer;
        } else {
            if (!this.hasFetchTTPlayerEnable) {
                this.isTTPlayerEnable = this.getAppSettings().isTTPlayerEnable();
                this.hasFetchTTPlayerEnable = true;
            }
            return this.isTTPlayerEnable;
        }
    }

    private void h(Activity arg12) {
        ServerLocationChangeHelper v0_3;
        int v0;
        int v10 = -1;
        if (arg12 == null) {
            v0 = 0;
        } else if (System.currentTimeMillis() > LocationUploadHelper.a(((Context) arg12)).j + 900000) {
            new ServerLocationChangeHelper(this.mContext).a("");
            this.fv = v10;
            v0 = 0;
        } else {
            v0 = 1;
        }

        if (v0 != 0) {
            switch (this.fv) {
                case 2: {
                    if (android.support.design.a.isTextEmpty(this.currentCityName)) {
                        this.fv = v10;
                        return;
                    }

                    String v3_2 = this.currentCityName;
                    if (arg12 == null) {
                        this.fv = v10;
                        return;
                    }

                    if (android.support.design.a.isTextEmpty(v3_2)) {
                        this.fv = v10;
                        return;
                    }

                    if (CategoryManager.getInstance(((Context) arg12)).getCategoryItem("news_local") == null) {
                        this.fv = v10;
                        return;
                    }

                    v0_3 = new ServerLocationChangeHelper(((Context) arg12));
                    v0 = System.currentTimeMillis() > v0_3.f + (((long) (v0_3.c * 1000))) ? 1 : 0;
                    if (v0 == 0) {
                        this.fv = v10;
                        return;
                    }

                    if (!android.support.design.a.isComponentActive(((Context) arg12))) {
                        this.fv = v10;
                        return;
                    }

                    if (android.support.design.a.isTextEmpty(v3_2)) {
                        this.fv = v10;
                        return;
                    }

                    LocationUploadHelper v4_1 = LocationUploadHelper.a(((Context) arg12));
                    ServerLocationChangeHelper v5 = new ServerLocationChangeHelper(((Context) arg12));
                    String v0_4 = this.fw;
                    String v1_1 = android.support.design.a.isTextEmpty(v0_4) ? arg12.getString(com.ss.android.article.browser.R.string.location_server_change_dlg_content_text, new Object[]{v3_2}) : v0_4;
                    AlertDialog.Builder v6 = com.ss.android.j.b.createDialogBuilder(arg12);
                    View v7 = LayoutInflater.from(arg12).inflate(com.ss.android.article.browser.R.layout.ha, null);
                    ((TextView) v7.findViewById(com.ss.android.article.browser.R.id.content_text)).setText(((CharSequence) v1_1));
                    v6.setCustomTitle(v7);
                    v6.setCancelable(true);
                    com.ss.android.article.base.app.f v0_5 = new com.ss.android.article.base.app.f(this, arg12, v3_2, v4_1);
                    v6.setNegativeButton(com.ss.android.article.browser.R.string.oz, ((DialogInterface.OnClickListener) v0_5));
                    v6.setPositiveButton(com.ss.android.article.browser.R.string.p0, ((DialogInterface.OnClickListener) v0_5));
                    this.eV = new com.ss.android.article.base.app.g(v4_1);
                    v6.setOnCancelListener((DialogInterface.OnCancelListener) new WeakDialogListener(this.eV));
                    v6.show();
                    MobClickCombiner.onEvent(arg12, "pop", "locate_change_category_show");
                    long v0_6 = System.currentTimeMillis();
                    v5.f = v0_6;
                    v5.a.edit().putLong("use_city_show_last_time", v0_6).commit();
                    v5.a(2, v0_6);
                    v5.b(1, v0_6);
                    break;
                }
                case 3: {
                    if (arg12 != null) {
                        ServerLocationChangeHelper v3 = new ServerLocationChangeHelper(arg12);
                        Object v0_1 = v3.b.getSystemService(Context.LOCATION_SERVICE);
                        if (v0_1 != null) {
                            List v0_2 = ((LocationManager) v0_1).getProviders(true);
                            if (v0_2 != null && (!v0_2.isEmpty() || System.currentTimeMillis() <= v3.e + (((long) (v3.d * 1000))))) {
                                v0 = 0;
//                                goto label_123;
                            } else {
                                v0 = 1;
                            }
                        } else {
                            v0 = 0;
                        }

                        label_123:
                        if (v0 == 0) {
                            this.fv = v10;
                            return;
                        }

                        if (!android.support.design.a.isComponentActive(arg12)) {
                            this.fv = v10;
                            return;
                        }

                        v0_3 = new ServerLocationChangeHelper(arg12);
                        com.ss.android.article.base.feature.app.ee v3_1 = new com.ss.android.article.base.feature.app.ee(((Context) arg12), "locate_change_city");
                        v3_1.a.setImageResource(0);
                        v3_1.b.setText(com.ss.android.article.browser.R.string.rq);
                        v3_1.c.setText(com.ss.android.article.browser.R.string.rp);
                        com.ss.android.article.base.app.e v1 = new com.ss.android.article.base.app.e(arg12);
                        v3_1.d.setText(com.ss.android.article.browser.R.string.ro);
                        v3_1.d.setOnClickListener(new com.ss.android.article.base.feature.app.g(v3_1, ((View.OnClickListener) v1)));
                        v3_1.show();
                        long v4 = System.currentTimeMillis();
                        v0_3.e = v4;
                        v0_3.a.edit().putLong("locale_setting_show_last_time", v4).commit();
                        v0_3.a(3, v4);
                        v0_3.b(1, v4);
                    } else {
                    }

                    break;
                }
            }

            label_25:
            this.fv = v10;
        }
    }

    static boolean h(AppData arg1) {
        arg1.ep = false;
        return false;
    }

    public final void h(String arg2) {
        this.eZ.remove(arg2);
    }

    public final boolean h() {
        boolean v0;
        if (android.support.design.a.isTest()) {
            v0 = this.mTTPlayerIp;
        } else {
            if (!this.gh) {
                this.isTTPlayerTpEnable = this.getAppSettings().isTTPlayerIPEnable();
                this.gh = true;
            }

            v0 = this.isTTPlayerTpEnable;
        }

        return v0;
    }

    public void handleMsg(Message message) {
        int v2_5 = 0;
        int v5;
        long v6;
        Iterator v4;
        Object v2_1;
        long v8 = 0;
        boolean v3 = true;
        if (message.what != 20) {
//            goto label_36;
        } else {
            if (message.obj != null) {
                try {
                    v2_1 = message.obj;
                    if (((List) v2_1).isEmpty()) {
                        return;
                    }

                    v4 = ((List) v2_1).iterator();
                    while (true) {
                        if (!v4.hasNext()) {
                            return;
                        }

                        Object v3_1 = v4.next();
                        if (!((Article) v3_1).userRepin) {
                            continue;
                        }

                        v2_1 = this.bt.a(((Article) v3_1).getItemKey());
                        if (v2_1 == null) {
                            continue;
                        }

                        if (((Article) v2_1).userRepin) {
                            continue;
                        }

                        ((Article) v2_1).userRepin = true;
                        if (((Article) v2_1).userRepinTime >= ((Article) v3_1).userRepinTime) {
                            continue;
                        }

                        ((Article) v2_1).userRepinTime = ((Article) v3_1).userRepinTime;
                    }
                } catch (Exception v2) {
                    return;
                }
            }
        }

//        label_36:
        if (message.what == 23) {
            if (!(message.obj instanceof Long)) {
                return;
            }

            try {
                v6 = ((Long) message.obj).longValue();
                if (message.arg1 == 0) {
                    v5 = 1;
                } else {
                    v5 = 0;
                }
                if (message.arg2 != 0) {
                    v3 = false;
                }
                if (v6 <= v8) {
                    return;
                }
                v4 = this.bx.iterator();
                while (true) {
                    if (!v4.hasNext()) {
                        return;
                    }

                    v2_1 = v4.next();
                    if (v2_1 == null) {
                        continue;
                    }

                    if (v5 != 0) {
                        ((AppData.a$d) v2_1).onPanelDislike(v6, v3);
                        continue;
                    }

                    ((AppData.a$d) v2_1).onPanelRefresh(v6);
                }
            } catch (Exception v2) {
                label_67:
                Logger.e("AppData", "exception in handlemsg : " + v2.toString());
                return;
            }
        }

        if (message.what == 10005 && ((message.obj instanceof String))) {
            v2_1 = message.obj;
            try {
                JSONObject v5_1 = new JSONObject(((String) v2_1));
                if ((v5_1.has("main_info_structure")) && v5_1.getInt("main_info_structure") == this.lastInfoStructure) {
                    this.em = 0;
                    this.needSendInfoStructure = false;
                    SharedPreferences.Editor v2_2 = this.mContext.getSharedPreferences("app_setting", 0).edit();
                    v2_2.putBoolean("need_send_info_structure", this.needSendInfoStructure);
                    SharedPreferenceCompat.commit(v2_2);
                }

                if (!v5_1.has("current_info_structure")) {
//                        goto label_109;
                } else {
                    this.em = 0;
                }
            } catch (Exception v2) {
            }
        }

        label_109:
        if (message.what == 102) {
            try {
                if (android.support.design.a.isTextEmpty(AppLog.deviceId())) {
//                        goto label_119;
                } else {
                    Activity v2_4 = this.aO();
                    if (v2_4 == null) {
//                        goto label_119;
                    } else {
                        CategoryManager.getInstance(((Context) v2_4)).a();
                    }
                }
            } catch (Throwable v2_3) {
            }
        }

        label_119:
        if (message.what == 108) {
            try {
                com.ss.android.article.base.app.r v5_2 = com.ss.android.article.base.app.r.a();
                JSONObject v6_1 = ((JSONObject) message.obj).optJSONObject("lite_ui_style_config");
                if (v6_1 == null) {
//                        goto label_131;
                } else if (v6_1 == null) {
                    Logger.i("LiteAppLogConfigHelper", "Parse LiteUIStyleConfig: failed");
//                        goto label_131;
                } else {
                    Logger.i("LiteAppLogConfigHelper", "Parse LiteUIStyleConfig: parsing");
                    if (v6_1.optInt("is_header_dark_style", 1) == 0) {
                        v3 = false;
                    }

                    int v4_1 = v6_1.optInt("category_style", 1);
                    String v7 = v6_1.optString("header_color", "#c34943");
                    try {
                        v2_5 = Color.parseColor(v7);
                    } catch (Exception v7_1) {
                        Logger.e("LiteAppLogConfigHelper", "Error parse color.", ((Throwable) v7_1));
                    }

                    v5_2.b.edit().putBoolean("is_header_dark_style", v3)
                            .putInt("category_style", v4_1)
                            .putInt("header_color", v2_5)
                            .putInt("feed_refresh_tips_style", v6_1.optInt("feed_refresh_tips_style", 0))
                            .apply();
                }
                if (com.ss.android.article.base.app.r.a == null) {
                } else {
                    v2_1 = com.ss.android.article.base.app.r.a.get();
                    if (v2_1 == null) {
                    } else {
                        ((com.ss.android.article.base.app.r.a) v2_1).a();
                    }
                }
            } catch (Throwable v2_3) {
            }
        }

        super.handleMsg(message);
    }

    static void i(AppData arg3) {
        Object v0 = null;
        try {
            if (arg3.cF != null) {
                v0 = arg3.cF.get();
            }

            String v1 = "video_app_installed";
            if (v0 != null) {
                MobClickCombiner.onEvent(((Context) v0), "detail", v1);
//                goto label_9;
            } else {
                AppLog.a("umeng", "detail", v1);
            }
        } catch (Exception v0_1) {
        }

        label_9:
        if (arg3.gq != null) {
            try {
                arg3.mContext.unregisterReceiver(arg3.gq);
                arg3.gq = null;
            } catch (Exception v0_1) {
                v0_1.printStackTrace();
            }
        }
    }

    public final void markFeedFirstLoad() {
        this.mFeedFirstLoad = false;
        SharedPreferences.Editor editor = this.mContext.getSharedPreferences("app_setting", 0).edit();
        editor.putBoolean("feed_first_load", false);
        SharedPreferenceCompat.commit(editor);
    }

    public final boolean j() {
        boolean v0 = this.getAbSettings().shouldShowLoginTipWhenFirstFavor() ? this.unloginFaverFirst : false;
        return v0;
    }

    public final void k() {
        this.loginDlgOk = true;
        SharedPreferences.Editor v0 = this.mContext.getSharedPreferences("app_setting", 0).edit();
        v0.putBoolean("login_dlg_ok", this.loginDlgOk);
        SharedPreferenceCompat.commit(v0);
    }

    private static List l(String arg7) {
        int v2;
        ArrayList v1_1;
        List v0 = null;
        if (android.support.design.a.isTextEmpty(arg7)) {
            return v0;
        }

        try {
            JSONArray v3 = new JSONArray(arg7);
            int v4 = v3.length();
            if (v4 <= 0) {
                return v0;
            }

            v1_1 = new ArrayList();
            v2 = 0;
            while (true) {
                label_11:
                if (v2 >= v4) {
                    ArrayList v0_1 = v1_1;
                    return v0;
                }

                String v5 = v3.getString(v2);
                if (!android.support.design.a.isTextEmpty(v5)) {
                    ((List) v1_1).add(v5);
                }
                ++v2;
                continue;
            }
        } catch (Exception v1) {
            return v0;
        }
    }

    public final boolean l() {
        long v8 = 86400000;
        boolean v0 = false;
        if (!this.loginDlgOk && this.loginDlgShowCountComment < this.loginDlgShowMaxComent) {
            long v2 = System.currentTimeMillis();
            if (v2 - this.loginDlgShowLast > (((long) this.loginDlgShowInterval)) * v8 && v2 - this.perDlgShowLast > (((long) this.perDlgShowInterval)) * v8) {
                v0 = true;
            }
        }

        return v0;
    }

    private void m(String arg4) {
        if (!android.support.design.a.isTextEmpty(arg4)) {
            try {
                this.mAnswerHostList = new JSONObject(arg4).optString("wenda_host_list", "");
                AnswerQueryUtils.a(l(this.mAnswerHostList));
            } catch (JSONException v0) {
                v0.printStackTrace();
            }
        }
    }

    public final void m() {
        SharedPreferences.Editor v0 = this.mContext.getSharedPreferences("app_setting", 0).edit();
        ++this.loginDlgShowCountComment;
        v0.putInt("login_dlg_show_count_comment", this.loginDlgShowCountComment);
        SharedPreferenceCompat.commit(v0);
    }

    private static void n(String arg3) {
        if (!android.support.design.a.isTextEmpty(arg3)) {
            try {
                JSONObject v0_1 = new JSONObject(arg3);
                if (v0_1.has("single_image")) {
                    v0_1.optInt("single_image", 3);
                }

                if (v0_1.has("normal")) {
                    v0_1.optInt("normal", 2);
                }

                if (v0_1.has("article_abstract")) {
                    v0_1.optInt("article_abstract", 4);
                }

                if (v0_1.has("article_post_content")) {
                    v0_1.optInt("article_post_content", 3);
                }

                if (v0_1.has("article_comment")) {
                    v0_1.optInt("article_comment", 2);
                }

                if (v0_1.has("topic_comment")) {
                    v0_1.optInt("topic_comment", 5);
                }

                if (v0_1.has("topic_title")) {
                    v0_1.optInt("topic_title", 3);
                }

                if (!v0_1.has("topic_content")) {
                    return;
                }

                v0_1.optInt("topic_content", 10);
            } catch (JSONException v0) {
            }
        }
    }

    public final void n() {
        this.pushDlgOk = true;
        SharedPreferences.Editor v0 = this.mContext.getSharedPreferences("app_setting", 0).edit();
        v0.putBoolean("push_dlg_ok", this.pushDlgOk);
        SharedPreferenceCompat.commit(v0);
    }

    public final boolean o() {
        long v8 = 86400000;
        boolean v0 = false;
        if (!this.pushDlgOk && !com.ss.android.newmedia.message.c.a().h() && this.pushDlgShowCount < this.pushDlgShowMax) {
            long v2 = System.currentTimeMillis();
            if (v2 - this.pushDlgShowLast > (((long) this.pushDlgShowInterval)) * v8 && v2 - this.perDlgShowLast > (((long) this.perDlgShowInterval)) * v8) {
                v0 = true;
            }
        }

        return v0;
    }

    public void onAccountRefresh(boolean arg13, int arg14) {
        int v0_4;
        long v2 = 0;
        long v10 = -1;
        super.onAccountRefresh(arg13, arg14);
        UpdateItemMgr v6 = UpdateItemMgr.getInstance(this.mContext);
        v6.g.b();
        long v0 = v6.mSpipe.isLogin ? v6.mSpipe.userId : v2;
        if (v6.c != v0) {
            v6.c = v0;
            e v0_1 = v6.g;
            v0_1.a.clear();
            v0_1.a();
        }

        this.ef = Spipe.inst().isLogin;
        if (this.ef) {
            this.mShowLoginTip = v10;
            SharedPreferences.Editor v0_2 = this.mContext.getSharedPreferences("app_setting", 0).edit();
            v0_2.putLong("show_login_tip", this.mShowLoginTip);
            SharedPreferenceCompat.commit(v0_2);
        }

        Spipe v0_3 = Spipe.inst();
        if (v0_3.isLogin) {
            if (this.eo != v0_3.userId) {
                this.eo = v0_3.userId;
                v0_4 = 1;
            } else {
                v0_4 = 0;
            }
        } else if (this.eo > v2) {
            this.eo = v10;
            v0_4 = 1;
        } else {
            label_63:
            v0_4 = 0;
        }

        if (v0_4 != 0) {
            this.O();
            DBHelper v0_5 = DBHelper.getInstance(this.mContext);
            ContentValues v1 = new ContentValues();
            v1.put("ss_op_key", Integer.valueOf(102));
            v0_5.asyncUpdate(v1);
        }
    }

    public final int p() {
        int v0 = 0;
        if (!TextUtils.isEmpty(this.pushGuideDlgArgs)) {
            try {
                int v1_1 = new JSONObject(this.pushGuideDlgArgs).optInt("image_type", 0);
                Logger.d("push_guide", "type : " + v1_1);
                v0 = v1_1;
            } catch (JSONException v1) {
                Logger.d("push_guide", v1.getMessage(), ((Throwable) v1));
            }
        }

        return v0;
    }

    public final void q() {
        if ((this.o()) && ((android.support.design.a.isTextEmpty(this.pushInterestText)) || System.currentTimeMillis() > this.pushInterestPullLast + 432000000)) {
            new ThreadPlus(new com.ss.android.article.base.app.b(this), "push_interest", true).start();
        }
    }

    public final String r() {
        return this.jsActlogUrl;
    }

    public static AppData getInstance() {
        if (instance == null) {
            MediaAppDataProvider v0 = ComponentsManifest.findComponent(MediaAppDataProvider.class);
            if (v0 != null && v0.provide() != null) {
                instance = v0.provide();
//                goto label_13;
            } else {
                throw new IllegalStateException("AppData not init");
            }
        }
        return (AppData) instance;
    }

    public final FeedTab t() {
        Object v0_1;
        if (this.T == null) {
            v0_1 = null;
        } else {
            v0_1 = this.T.get();
        }

        return ((FeedTab) v0_1);
    }

    public final Activity u() {
        FeedTab v0 = this.t();
        Activity v0_1 = v0 == null ? null : v0.getActivity();
        return v0_1;
    }

    public final boolean isAppForeground() {
        return this.isAppForeground;
    }

    public static String w() {
        return mTemiUrlList;
    }

    public static boolean x() {
        return false;
    }

    public final boolean shouldPreload() {
        return VideoCacheController.SHOULD_PRELOAD
                ? true
                : this.mVideoPreloadingFlag > 0;
    }

    public final boolean hasVideoKeepPos() {
        return this.mVideoKeepPos > 0;
    }
}

